webForumDet fria alternativet

MySQL i ASP

ASP

3 svar · 403 visningar · startad av WebbisNet

Medlem sedan feb. 20032 027 inlägg
Frågan#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?

632 ms totalt · 4 externa anrop · v20260731065814-full.a51de22e
122 ms — deklarationer (db)
0 ms — hämta statistik (cache)
505 ms — hämta tråd, inlägg och bilagor (db)
124 ms — ändringar (db)