Author |
Topic  |
tribaliztic
Senior Member
   
Sweden
1532 Posts |
Posted - 26 March 2004 : 03:50:55
|
(I use serverhacker code...) Copy of database and files taken from server1, imported to server2. Both server1 and server2 are IIS/MySQL. I use this connstring: strConnString = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=srv;USER=uid;PASSWORD=pwd;DATABASE=db;OPTION=4;" I have MyODBC 3.51 installed on the server.
Everything work fine on server1, on server 2 i get an error on SOME member profiles, not all. No matter if the user is normal user/moderator/admin or what usergroup they belong to.
The error is: 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. /forum/pop_profile.asp, line 242
and the line is: else strMyHobbies = rs("M_HOBBIES") -------------------->> strMyQuote = rs("M_QUOTE") strMyLNews = rs("M_LNEWS") strMyBio = rs("M_BIO") strRoll = rs("M_ROLL") '#########Avatar Start###########
I have tried importing the data again, even tried with old backups of both files and database. No change. The forum has been running on server2 before. Can anyone see what is the problem? |
/Tribaliztic - www.gotlandrace.se -
|
Edited by - ruirib on 26 March 2004 04:31:23 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 26 March 2004 : 04:28:08
|
I see from your code sample that you have added some mods, this may be the problem.
The error reported generally happens when the datafields are not being pulled from database in the correct order.
find the code that creates the query, basically, if you have added any NON MEMO fields after any MEMO fields in your query then this error will occur. |
 |
|
tribaliztic
Senior Member
   
Sweden
1532 Posts |
Posted - 26 March 2004 : 05:07:09
|
HuwR: The code is working on other servers. I saw your post about the same error in another thread and tried that, but no luck. Maybe I got it wrong somewhere. But since the code is working on not one but two other servers I think the problem lies in the server? The field M_QUOTE is empty, if that is of any help?
|
/Tribaliztic - www.gotlandrace.se -
|
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 26 March 2004 : 05:25:04
|
yes the problem does lie on the server, but it is still the code that is causing the error not the server, can you post the lines that create the query |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 26 March 2004 : 05:28:33
|
try installing the latest MySQL drivers on the server, this is the most likely cause of the problem |
 |
|
tribaliztic
Senior Member
   
Sweden
1532 Posts |
Posted - 26 March 2004 : 06:04:58
|
Here's the file: http://213.65.78.5/pop_profile.txt I'll check the drivers, I have the latest stable I think. (If we are talking about the same drivers that is..)
|
/Tribaliztic - www.gotlandrace.se -
|
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 26 March 2004 : 06:08:16
|
The only thing that is likely to be different across machines (that could affect it) would be the drivers. make sure you laso have the latest MDAC updates |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 26 March 2004 : 06:09:18
|
I didn't want the whole of your file, just the relevant query. |
 |
|
tribaliztic
Senior Member
   
Sweden
1532 Posts |
Posted - 26 March 2004 : 06:19:54
|
yeah, sorry but it's a LONG query and I didn't want to post a gigantic post...
|
/Tribaliztic - www.gotlandrace.se -
|
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 26 March 2004 : 06:26:51
|
Ok, look at this bit of the query
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_OCCUPATION"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_HOBBIES"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_QUOTE"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_LNEWS"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_BIO"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_ROLL"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_RANK"
'#########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#############
none of the lines after strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_BIO" should be there, they should be earlier in the query since M_BIO is a memo filed and none of those others are. change the code so that it looks like this
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_ROLL"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_RANK"
'#########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 & ", " & strMemberTablePrefix & "MEMBERS.M_OCCUPATION"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_HOBBIES"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_QUOTE"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_LNEWS"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_BIO"
|
 |
|
tribaliztic
Senior Member
   
Sweden
1532 Posts |
Posted - 26 March 2004 : 06:34:27
|
Okay, the error moved to this: else strMyHobbies = rs("M_HOBBIES") strMyQuote = rs("M_QUOTE") strMyLNews = rs("M_LNEWS") strMyBio = rs("M_BIO") strRoll = rs("M_ROLL") '#########Avatar Start########### if StrShowAvatar = "1" then strMyAvatar = rs("M_AVATAR") strMyAvatarW = rs("M_AVATAR_WIDTH") strMyAvatarH = rs("M_AVATAR_HEIGHT") end if '#########Avatar End#############
I guess I'll have to move those around also =)
|
/Tribaliztic - www.gotlandrace.se -
|
 |
|
tribaliztic
Senior Member
   
Sweden
1532 Posts |
Posted - 26 March 2004 : 06:38:19
|
But the lines don't match.. hehe.. what lines should be where? =)
|
/Tribaliztic - www.gotlandrace.se -
|
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 26 March 2004 : 06:57:22
|
try using a standard pop_profile, if that works it is the code, if it doesn't it is the server. |
 |
|
tribaliztic
Senior Member
   
Sweden
1532 Posts |
Posted - 26 March 2004 : 07:03:31
|
I tried that, and only get errors because code for some mods are missing. I have used another pop_profile.asp that I KNOW that is has been working earlier. The problem occured after I imported the data from server1 and won't go away even if I import an older dump that I know has been working before.
|
/Tribaliztic - www.gotlandrace.se -
|
 |
|
tribaliztic
Senior Member
   
Sweden
1532 Posts |
Posted - 26 March 2004 : 07:14:26
|
I just tried an old backup (of the files) that I know has been working, got the same error. I can't understand what is the causing this, the only thing I did was importing a backup to the database...
|
/Tribaliztic - www.gotlandrace.se -
|
 |
|
tribaliztic
Senior Member
   
Sweden
1532 Posts |
Posted - 26 March 2004 : 07:23:44
|
in admin options/server info I can only find two differences server1: IIS6.0 server2: IIS5.0 and server1: Provider Name MSDASQL.DLL OLE DB Version 02.00 Provider Version 02.80.1022.0
server2: Provider Name MSDASQL.DLL OLE DB Version 02.00 Provider Version 02.53.6200.0
|
/Tribaliztic - www.gotlandrace.se -
|
 |
|
Topic  |
|