Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Bug Reports (Closed)
 V33(.02)+(.03) BUG + FIX: View Member Profile
 Forum Locked  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

bdinicola
Starting Member

USA
14 Posts

Posted - 27 July 2001 :  11:18:51  Show Profile  Visit bdinicola's Homepage  Send bdinicola an AOL message  Send bdinicola an ICQ Message
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  Show Profile  Visit BugLaden's Homepage  Send BugLaden an AOL message
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
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 30 July 2001 :  04:12:38  Show Profile  Visit gor's Homepage
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
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 30 July 2001 :  05:51:27  Show Profile  Visit HuwR's Homepage
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.

Go to Top of Page

bdinicola
Starting Member

USA
14 Posts

Posted - 30 July 2001 :  08:48:46  Show Profile  Visit bdinicola's Homepage  Send bdinicola an AOL message  Send bdinicola an ICQ Message
Thanks again! As always... You rock!!!

Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 30 July 2001 :  09:05:51  Show Profile  Visit HuwR's Homepage
This fix needs to be done to all three MEMBER select queries in pop_profile

Go to Top of Page

liqu1d
Starting Member

Greece
47 Posts

Posted - 30 July 2001 :  09:10:24  Show Profile  Visit liqu1d's Homepage
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.





Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 30 July 2001 :  09:15:24  Show Profile  Visit gor's Homepage
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
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 30 July 2001 :  09:19:11  Show Profile  Visit HuwR's Homepage
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.

Go to Top of Page

davemaxwell
Access 2000 Support Moderator

USA
3020 Posts

Posted - 30 July 2001 :  10:35:15  Show Profile  Visit davemaxwell's Homepage  Send davemaxwell an AOL message  Send davemaxwell an ICQ Message  Send davemaxwell a Yahoo! Message
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
Go to Top of Page

kirgy
New Member

Germany
95 Posts

Posted - 30 July 2001 :  15:40:50  Show Profile  Visit kirgy's Homepage
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

Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 30 July 2001 :  17:51:13  Show Profile
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
Go to Top of Page

speedway
New Member

88 Posts

Posted - 01 August 2001 :  11:12:50  Show Profile
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
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 01 August 2001 :  12:11:05  Show Profile  Visit HuwR's Homepage
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.

Go to Top of Page

Twig
Starting Member

5 Posts

Posted - 02 August 2001 :  07:29:19  Show Profile
I commented those lines out of inc_profile and the values weren't displayed anymore, so I put them back.

Go to Top of Page

VodkaFish
Average Member

USA
654 Posts

Posted - 17 August 2001 :  17:45:43  Show Profile  Send VodkaFish an AOL message  Send VodkaFish an ICQ Message  Send VodkaFish a Yahoo! Message
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
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 Forum Locked  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.17 seconds. Powered By: Snitz Forums 2000 Version 3.4.07