Author |
Topic |
|
redharmonic
Starting Member
Canada
3 Posts |
|
Francodepaw
Junior Member
USA
111 Posts |
Posted - 23 June 2003 : 01:54:37
|
Is your database MySql? Check the values of the fields in the Avatar table. Two fixes here the second sounds like what you are experiencing.
This I posted on Server Hackers Forum.
The first issue I had was a result of converting from Access to MySql (use MySql Front) M_AVATAR in the MEMBERS database was Created as a Text Field. Everytime someone would delete thier avatar and leave the field blank when any tried to view thier profile it would error out with the following error.
Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80040E21) Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
Changed M_AVATAR from text field to varchar field with a length of 255 and that fixed that one.
The second issue I ran across was when someone deleted thier Quote, News or Bio it would result in the same error as above.
I found on Snitz.net that in Sql Queries the blob fields must be in the correct order as they are read into the string.
I found M_NEWS to be in the wrong location.
My pop_profile.asp ended up looking like this:
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_HOBBIES" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_LNEWS" strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_QUOTE" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_BIO" '#########Avatar Start########### if StrShowAvatar = "1" then strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_AVATAR" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_AVATAR_WIDTH" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_AVATAR_HEIGHT" end if '#########Avatar End############# strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS " strSql = strSql & " WHERE MEMBER_ID=" & ppMember_ID
And a little further down I moved strMyLNews above Myquote just to keep it fluid.
strMyHobbies = rs("M_HOBBIES") strMyLNews = rs("M_LNEWS") strMyQuote = rs("M_QUOTE") strMyBio = rs("M_BIO")
Worked for me
|
Edited by - Francodepaw on 23 June 2003 01:55:18 |
|
|
DoraMoon
Average Member
Taiwan
661 Posts |
Posted - 23 June 2003 : 09:31:40
|
hi~ Ryan,
there are 2 lines missing on your pop_profile.asp modified code.. at line.308 end if ' strPicture If strShowAvatar = "1" then if IsNull(rs("M_AVATAR_URL")) or rs("M_AVATAR_URL") = "" or rs("M_AVATAR_URL") = " " or rs("M_AVATAR_URL") = "noavatar.gif" then Response.write " <tr>" & vbNewLine & _
try correcting it and see if this can solve your problem.
and another thing.. if you hav'nt turned off the "friendly error message" on your IE setting yet. i'll suggest that you just do it now. http://forum.snitz.com/forum/topic.asp?TOPIC_ID=27452&SearchTerms=friendly,error,ie then you'll know the detail error message and line number easily when got problem with your modded code next time. |
|
|
redharmonic
Starting Member
Canada
3 Posts |
Posted - 23 June 2003 : 19:28:46
|
wow. you people are amazing. thanks a bunch for your efforts. it's all working properly now.
Francodepaw-> I'm on the free brinkster server, which is using Access. However, I'll be changing servers soon, and your reply may come in handy.
thanks again. :D
--Ryan |
|
|
|
Topic |
|