Set conn = Server.CreateObject("ADODB.connection")
conn.Open connstr
tblstart = Request.Form("txtstart")
tblTopRight = Request.Form("txtTopRight")
tblBottom = Request.Form("txtBottom")
SQL="UPDATE Mainsite SET tblStart='txtStart, tblTopRight='txtTopRight', tblBottom='txtBottom'"
SQL = SQL & "(tblStart, tblTopRight, tblBottom)"
SQL = SQL & "VALUES(' " & txtStart & " ',' " & txtTopRight & " ',' " & txtBottom & " ')"
Conn.Execute(SQL)
Response.Redirect "../main.asp"
Vad är det som gör att koden funkar
Felet jag får är:
ADODB.Connection.1 error '80004005'
SQLState: 42000
Native Error Code: 1064
[TCX][MyODBC]You have an error in your SQL syntax near 'txtTopRight', tblBottom='txtBottom'(tblStart, tblTopRight, tblBottom)VALUES(' '' at line 1
/asp/Admin/db-conn/update-start.asp, line 12