Author |
Topic |
|
Martijn
Starting Member
10 Posts |
Posted - 04 April 2002 : 14:11:51
|
I've installed the mod and everything went fine, until I posted a REPLY(not a new topic).
He gave me this error when I submitted : quote: Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) [Microsoft][ODBC Microsoft Access Driver] Number of query values and destination fields are not the same. /planetroadhog/post_info.asp, line 774
What could it be???
If this could help :
quote: '## Forum_SQL strSql = "INSERT INTO " & strTablePrefix & "REPLY " strSql = strSql & "(TOPIC_ID" strSql = strSql & ", FORUM_ID" strSql = strSql & ", CAT_ID" strSql = strSql & ", R_AUTHOR" strSql = strSql & ", R_DATE " if strIPLogging <> "0" then strSql = strSql & ", R_IP" end if strSql = strSql & ", R_STATUS" strSql = strSql & ", R_MESSAGE" strSql = strSql & ", R_SIG" strSql = strSql & ") VALUES (" strSql = strSql & Topic_ID strSql = strSql & ", " & Forum_ID strSql = strSql & ", " & Cat_ID strSql = strSql & ", " & rs("MEMBER_ID") strSql = strSql & ", " & "'" & DateToStr(strForumTimeAdjust) & "'" if strIPLogging <> "0" then strSql = strSql & ", " & "'" & Request.ServerVariables("REMOTE_ADDR") & "'" end if ' DEM --> Added R_STATUS to allow for moderation of posts ' Used R_STATUS = 1 to match the topic status code. if Moderation = "Yes" then strSql = strSql & ", 2" else strSql = strSql & ", 1" end if ' DEM --> End of Code added strSql = strSql & ", " & "'" & txtMessage & "'" strSql = strSql & ")" If Request.Form("Sig") = "yes" Then strSql = strSql & ", 1" Else strSql = strSql & ", 0" End If
Edited by - martijn on 04 April 2002 14:15:05 |
|
Martijn
Starting Member
10 Posts |
Posted - 04 April 2002 : 14:19:12
|
Nex thing what I did was : quote: '## Forum_SQL strSql = "INSERT INTO " & strTablePrefix & "REPLY " strSql = strSql & "(TOPIC_ID" strSql = strSql & ", FORUM_ID" strSql = strSql & ", CAT_ID" strSql = strSql & ", R_AUTHOR" strSql = strSql & ", R_DATE " if strIPLogging <> "0" then strSql = strSql & ", R_IP" end if strSql = strSql & ", R_STATUS" strSql = strSql & ", R_MESSAGE" strSql = strSql & ", R_SIG" strSql = strSql & ") VALUES (" strSql = strSql & Topic_ID strSql = strSql & ", " & Forum_ID strSql = strSql & ", " & Cat_ID strSql = strSql & ", " & rs("MEMBER_ID") strSql = strSql & ", " & "'" & DateToStr(strForumTimeAdjust) & "'" if strIPLogging <> "0" then strSql = strSql & ", " & "'" & Request.ServerVariables("REMOTE_ADDR") & "'" end if ' DEM --> Added R_STATUS to allow for moderation of posts ' Used R_STATUS = 1 to match the topic status code. if Moderation = "Yes" then strSql = strSql & ", 2" else strSql = strSql & ", 1" end if ' DEM --> End of Code added strSql = strSql & ", " & "'" & txtMessage & "'" If Request.Form("Sig") = "yes" Then strSql = strSql & ", 1" Else strSql = strSql & ", 0" strSql = strSql & ")" End If
I've set the ')' to the back.
That gave me the following error :
quote: Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement. /planetroadhog/post_info.asp, line 774
This is even more weirder I've checked the ',', but it could be I've made a mistake there. Can anyone confirm this?
Edited by - martijn on 04 April 2002 14:26:31 |
|
|
Nathan
Help Moderator
USA
7664 Posts |
Posted - 04 April 2002 : 16:45:23
|
You did it right, except you need to put that ) outside the if structure.
'## Forum_SQL strSql = "INSERT INTO " & strTablePrefix & "REPLY " strSql = strSql & "(TOPIC_ID" strSql = strSql & ", FORUM_ID" strSql = strSql & ", CAT_ID" strSql = strSql & ", R_AUTHOR" strSql = strSql & ", R_DATE " if strIPLogging <> "0" then strSql = strSql & ", R_IP" end if strSql = strSql & ", R_STATUS" strSql = strSql & ", R_MESSAGE" strSql = strSql & ", R_SIG" strSql = strSql & ") VALUES (" strSql = strSql & Topic_ID strSql = strSql & ", " & Forum_ID strSql = strSql & ", " & Cat_ID strSql = strSql & ", " & rs("MEMBER_ID") strSql = strSql & ", " & "'" & DateToStr(strForumTimeAdjust) & "'" if strIPLogging <> "0" then strSql = strSql & ", " & "'" & Request.ServerVariables("REMOTE_ADDR") & "'" end if ' DEM --> Added R_STATUS to allow for moderation of posts ' Used R_STATUS = 1 to match the topic status code. if Moderation = "Yes" then strSql = strSql & ", 2" else strSql = strSql & ", 1" end if ' DEM --> End of Code added strSql = strSql & ", " & "'" & txtMessage & "'" If Request.Form("Sig") = "yes" Then strSql = strSql & ", 1" Else strSql = strSql & ", 0" End If strSql = strSql & ")"
Nathan Bales - Romans 15:13 ---------------------------------- Snitz Exchange | Do's and Dont's |
|
|
Martijn
Starting Member
10 Posts |
Posted - 05 April 2002 : 02:09:00
|
Ok thanks.
See, very stupid mistake
It works back perfect now!
Edited by - martijn on 05 April 2002 02:13:39 |
|
|
Nathan
Help Moderator
USA
7664 Posts |
Posted - 05 April 2002 : 02:28:54
|
Stupid mistakes are the ones you make twice
Nathan Bales - Romans 15:13 ---------------------------------- Snitz Exchange | Do's and Dont's |
|
|
|
Topic |
|
|
|