Author |
Topic |
bdinicola
Starting Member
USA
14 Posts |
Posted - 27 July 2001 : 11:18:51
|
From the members.asp if anyone clicks on the member name or the "view member's profile" icon they get the following error.
Microsoft OLE DB Provider for ODBC Drivers error '80040e21'
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
/forums/pop_profile.asp, line 110
You can edit the profile with no problem, it just appears that you can't view it without creating multiple errors.
Edited by - bdinicola on 27 July 2001 11:19:20
Edited by - Davio on 31 August 2001 22:38:06 |
|
BugLaden
Starting Member
45 Posts |
Posted - 29 July 2001 : 20:49:43
|
I fixed the above problem myself by:
Editing pop_profile.asp
1) Commenting out lines 74-103, which were individual fields in the select 2) Inserting at line 74 strSQL = "SELECT *"
-=BugLaden CCG Workshop Developer http://www.ccgworkshop.com |
|
|
gor
Retired Admin
Netherlands
5511 Posts |
Posted - 30 July 2001 : 04:12:38
|
quote:
I fixed the above problem myself by:
Editing pop_profile.asp
1) Commenting out lines 74-103, which were individual fields in the select 2) Inserting at line 74 strSQL = "SELECT *"
Though I don't have a fix yet, this is not one. Use of SELECT * should be avoided at all times.
Pierre Join a Snitz Mailinglist |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 30 July 2001 : 05:51:27
|
sorry or, I posted a fix but my pc crashed, here it is again
change this bit of code
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_SEX" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_OCCUPATION" strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_HOBBIES" strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_QUOTE" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_BIO" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_LNEWS" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_SIG" strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS " strSql = strSql & " WHERE MEMBER_ID=" & ChkString(Request.QueryString("id"), "SQLString")
set rs = my_Conn.Execute(strSql) strMyHobbies = rs("M_HOBBIES") strMyLNews = rs("M_LNEWS") strMyQuote = rs("M_QUOTE") strMyBio = rs("M_BIO")
to this
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_SEX" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_OCCUPATION" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_SIG" strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_HOBBIES" strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_QUOTE" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_BIO" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_LNEWS" strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS " strSql = strSql & " WHERE MEMBER_ID=" & ChkString(Request.QueryString("id"), "SQLString")
set rs = my_Conn.Execute(strSql) strMyHobbies = rs("M_HOBBIES") strMyQuote = rs("M_QUOTE") strMyBio = rs("M_BIO") strMyLNews = rs("M_LNEWS")
for some reason, it must be in that order at the end.
|
|
|
bdinicola
Starting Member
USA
14 Posts |
Posted - 30 July 2001 : 08:48:46
|
Thanks again! As always... You rock!!!
|
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 30 July 2001 : 09:05:51
|
This fix needs to be done to all three MEMBER select queries in pop_profile
|
|
|
liqu1d
Starting Member
Greece
47 Posts |
Posted - 30 July 2001 : 09:10:24
|
This error occures because you have to fetch fields the same way you will display them. If you mix the order this error will occur.
It's guite common when you select fields using ASP. That's why SELECT * works fine. You don't set to order that you fetch the data.
|
|
|
gor
Retired Admin
Netherlands
5511 Posts |
Posted - 30 July 2001 : 09:15:24
|
quote:
This error occures because you have to fetch fields the same way you will display them. If you mix the order this error will occur.
It's guite common when you select fields using ASP. That's why SELECT * works fine. You don't set to order that you fetch the data.
But since SELECT * is slower that naming all the fields you want one by one, we stick to using it the way it is.
Pierre Join a Snitz Mailinglist |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 30 July 2001 : 09:19:11
|
quote:
This error occures because you have to fetch fields the same way you will display them. If you mix the order this error will occur.
It's guite common when you select fields using ASP. That's why SELECT * works fine. You don't set to order that you fetch the data.
Actually, Select * will not always work, if you reference an Ntext or blob field and then reference another field like an int or text, it will also error. unless you explicitly assign the memo/blob fields to a variable in the order they apear in the select statement. Select * is therfore fine if there is onle one Blob or Memo field. It is therfore essential to name all the memo/blob fields in a select clause if there are more than one.
plus, qualifying the field names rather than using * is much quicker.
|
|
|
davemaxwell
Access 2000 Support Moderator
USA
3020 Posts |
Posted - 30 July 2001 : 10:35:15
|
You also need to select blobs/text fields at the end of the select statement because it will screw up the data returned otherwise. This is a fluke within all implementations of SQL I have ever seen....
Dave Maxwell -------------- Proud to be a "World Class" Knucklehead |
|
|
kirgy
New Member
Germany
95 Posts |
Posted - 30 July 2001 : 15:40:50
|
quote:
sorry or, I posted a fix but my pc crashed, here it is again
change this bit of code
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_SEX" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_OCCUPATION" strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_HOBBIES" strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_QUOTE" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_BIO" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_LNEWS" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_SIG" strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS " strSql = strSql & " WHERE MEMBER_ID=" & ChkString(Request.QueryString("id"), "SQLString")
set rs = my_Conn.Execute(strSql) strMyHobbies = rs("M_HOBBIES") strMyLNews = rs("M_LNEWS") strMyQuote = rs("M_QUOTE") strMyBio = rs("M_BIO")
to this
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_SEX" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_OCCUPATION" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_SIG" strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_HOBBIES" strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_QUOTE" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_BIO" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_LNEWS" strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS " strSql = strSql & " WHERE MEMBER_ID=" & ChkString(Request.QueryString("id"), "SQLString")
set rs = my_Conn.Execute(strSql) strMyHobbies = rs("M_HOBBIES") strMyLNews = rs("M_QUOTE") strMyQuote = rs("M_BIO") strMyBio = rs("M_LNEWS")
for some reason, it must be in that order at the end.
I´m confused, is that right
|
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 30 July 2001 : 17:51:13
|
No, it isn't. Just change the variable names to match with the correct order Huwr posted.strMyHobbies = rs("M_HOBBIES") strMyQuote = rs("M_QUOTE") strMyBio = rs("M_BIO") strMyLNews = rs("M_LNEWS")
- David |
|
|
speedway
New Member
88 Posts |
Posted - 01 August 2001 : 11:12:50
|
Should this also be changed in inc_profile.asp line 117.
I have had a problem when people change their profile and it alwasy lost the Hobbies etc. Changing the order in inc_profile.asp to will fix this problem. strMyHobbies = rs("M_HOBBIES") strMyQuote = rs("M_QUOTE") strMyBio = rs("M_BIO") strMyLNews = rs("M_LNEWS")
Snitz V3_1_SR4 SQL Server 7 IIS4 |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 01 August 2001 : 12:11:05
|
quote:
Should this also be changed in inc_profile.asp line 117.
I have had a problem when people change their profile and it alwasy lost the Hobbies etc. Changing the order in inc_profile.asp to will fix this problem. strMyHobbies = rs("M_HOBBIES") strMyQuote = rs("M_QUOTE") strMyBio = rs("M_BIO") strMyLNews = rs("M_LNEWS")
Snitz V3_1_SR4 SQL Server 7 IIS4
Strictly, those four lines should be removed, since the variable have already been set.
|
|
|
Twig
Starting Member
5 Posts |
Posted - 02 August 2001 : 07:29:19
|
I commented those lines out of inc_profile and the values weren't displayed anymore, so I put them back.
|
|
|
VodkaFish
Average Member
USA
654 Posts |
Posted - 17 August 2001 : 17:45:43
|
as i'm combing through all the fixes to make for 3.3.02, i landed on this one, but i'm not getting any error. does this mean it was already made in the version i downloaded or am i not hitting it for another reason? i just want to know whether or not to make these changes.
quote: This fix needs to be done to all three MEMBER select queries in pop_profile
if i do need to fix this, is it only in pop_profile? because i see inc_profile is talked about here too.
v ø d k â f ï § h |
|
|
Topic |
|