Can anyone tell me why this code:
Keeps producing the error:
The SQL statement works just fine in my local copy of the database, but it just will not work when I run it against the database on the remote server.
Code:
set oConn = Server.CreateObject("ADODB.Connection")
DBPATH = Server.MapPath("/") & "\subdir\dbasename.mdb;"
keyarch_noDSN = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DBPATH & "Persist Security Info=False"
oConn.Open(keyarch_noDSN)
strSQL = "INSERT INTO tblUser (Username,Password) VALUES ('clay','pass')"
Set cmdTest = Server.CreateObject("ADODB.Command")
cmdTest.ActiveConnection = oConn
cmdTest.CommandText = strSQL
cmdTest.Execute
cmdTest.ActiveConnection.Close
Set cmdTest = Nothing
Set oConn = Nothing
Keeps producing the error:
Code:
Microsoft JET Database Engine error '80040e14'
Syntax error in INSERT INTO statement.
/debug.asp, line 14
The SQL statement works just fine in my local copy of the database, but it just will not work when I run it against the database on the remote server.