| Database INSERT INTO problems
|
lZakl

msg:957403 | 7:06 pm on Feb 9, 2006 (gmt 0) | I am receiving the following error when I try to insert a new row into my test database 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
|
mattglet

msg:957404 | 9:39 pm on Feb 9, 2006 (gmt 0) | Your database probably doesn't have write permissions for the IUSR account.
|
Dijkgraaf

msg:957405 | 10:00 pm on Feb 9, 2006 (gmt 0) | What happens if you just try to read from the database, is that sucesfull?
|
txbakers

msg:957406 | 10:17 pm on Feb 9, 2006 (gmt 0) | in access you can't have the design view open while doing updates. also, check your syntax of things like dates, etc.
|
miedmark

msg:957407 | 1:01 am on Feb 10, 2006 (gmt 0) | | Operation must use an updateable query. |
| Sounds like permissions to me.
|
Alessio

msg:957408 | 10:29 am on Feb 10, 2006 (gmt 0) | i have the same problem and my database have no particular setting as permissions... 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
|
aspdaddy

msg:957409 | 6:11 pm on Feb 11, 2006 (gmt 0) | You need to grant write access to the folder that the database in for the user account that IIS runs under when executing the asp code, typically IUSR_MACHINE.
|
|
|