MySQL i ASP

ASP

3 svar · 407 visningar · startad av WebbisNet

Medlem sedan feb. 20032 027 inlägg
Trådstart#1

Kan nån se varför jag får
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

/chat/preDefault.asp, line 2

med denna kod
<!-- #include virtual="include/dbconn.asp" -->
<%Set preChat=objConn.Execute("Update tblUsers SET Chattar = -1 WHERE userID= " & Request.Cookies("UserID") &"")
response.redirect "/chat/default.asp"%>

Medlem sedan aug. 2002600 inlägg
#2

WebbisNet skrev:

Kan nån se varför jag får
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

/chat/preDefault.asp, line 2

med denna kod
<!-- #include virtual="include/dbconn.asp" -->
<%Set preChat=objConn.Execute("Update tblUsers SET Chattar = -1 WHERE userID= " & Request.Cookies("UserID") &"")
response.redirect "/chat/default.asp"%>

Testa med:
<!-- #include virtual="include/dbconn.asp" -->
<%Set preChat=objConn.Execute("Update tblUsers SET Chattar = Chattar -1 WHERE userID= " & Request.Cookies("UserID") &"")
response.redirect "/chat/default.asp"%>

Medlem sedan feb. 20032 027 inlägg
#3

Samma fel

Har även strul med
Set bildRS=objConn.Execute("SELECT clicks,tblUsers.userID, tblUsers.username, tblUsers.picture, * FROM tblUsers LEFT JOIN tblUsers_Galleri ON tblUsers.userID = tblUsers_Galleri.agare WHERE tblUsers_Galleri.agare="&request("userID") &" ORDER BY tblUsers_Galleri.bildID DESC")

får felet
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '* FROM tblUsers LEFT JOIN tblUsers_Galleri ON tblUsers.userID =

/gallery/Default.asp, line 9

Medlem sedan dec. 19996 721 inlägg
#4

Vad har du stjärnan (*) till? Ta bort den och ange kolumnerna du behöver. Och request("userID") är väl inte tom?

260 ms totalt · 4 externa anrop · v20260731065814-full.d34c6d5a
128 ms — deklarationer (db)
0 ms — hämta statistik (cache)
129 ms — hämta tråd, inlägg och bilagor (db)
128 ms — ändringar (db)