Forum Moderators: open
Microsoft JET Database Engine error '80004005'
Operation must use an updateable query.
I don't know if my syntax is correct. A fairly easy task is getting harder and harder it seems! Don't they always though? Here is my syntax .. I am just learning ASP and SQL, so please go easy on me!
Set DataConnect = Server.CreateObject("ADODB.Connection")
DataConnect.Provider = "Microsoft.Jet.OLEDB.4.0;"
DataConnect.Properties("Jet OLEDB:Database Password") = "******"
DataConnect.Open "Data Source=D:.../.../test.mdb;"
sSQL = "insert into test (busName, contact_fn, contact_ln, address, city) values ('" & busName & "', '" & contact_fn & "', '" & contact_ln & "', '" & address & "', '" & city & "')"
DataConnect.execute(sSQL)
DataConnect.Close
Set DataConnect = Nothing
It's hard to troubleshoot when you are learning a new language. And all I have to go by are these books that have examples that can't be applied to real-world coding and provide no assistance in troubleshooting when it doesn't work. Live and learn is the best way anyway I figure.
Thank you for any input you might have!
-- Zak
i noticed that i have two different errors changing the database connenction instructions. In detail:
1.
set conn=Server.CreateObject("ADODB.Connection")
conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="& Server.Mappath("/data/databaseName.mdb")
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
2.
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/Inetpub/wwwroot/data/databaseName.mdb"
Error type
Microsoft JET Database Engine (0x80040E14)
Syntax error in INSERT INTO statement.
/AgipKCOOLQR/Module/AgipKCO-OLQR-ModuleInsert.asp, line 64
If someone have any suggestions!
Thanks