Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
domagoj
Starting Member
5 Posts |
Posted - 2003-03-23 : 19:19:59
|
Error message:Microsoft JET Database Engine error '80004005' Operation must use an updateable query. Happens since server admin worked on his serverTried to execute SQL string from ASP - errorTried to execute stored query from ASP ("Exec myquery") - errorThe same query works fine inside MSAccessstored query (myquery):UPDATE ad SET brojac = brojac-1WHERE id=1;Anybody knows what's goin' on? |
|
mohdowais
Sheikh of Yak Knowledge
1456 Posts |
Posted - 2003-03-24 : 02:50:17
|
Is your ADO connection read-only? It seems that sometimes Access connections from ASP are opened in read-only mode. Try adding the Mode parameter to the connection string:Mode=3 --adModeReadWriteor Mode=12 --adModeShareExclusiveOS |
 |
|
domagoj
Starting Member
5 Posts |
Posted - 2003-03-24 : 05:48:59
|
This is connection I usedSet Con = Server. CreateObject ("ADODB.Connection")Con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & application("PathToDatabase") & ";"Set RS = con.execute ("Exec MyQuery") |
 |
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2003-03-24 : 07:42:21
|
Many queries are NOT updatable -- what is the query you are trying to update?If the query includes group by's, unions, or joins that are not specifically indicated in the relationships screen, those are ususally common cases.- Jeff |
 |
|
mohdowais
Sheikh of Yak Knowledge
1456 Posts |
Posted - 2003-03-24 : 08:30:07
|
This query will not return a recordset, so the syntaxSet rs = conn.Execute ("Exec MyQuery") does not make sense. Try using a ADO Command Object instead, set the Command Type to adCmdStoredProc, set the CommandText to the name of the query, and execute!Update Queries in Access are analogous to SQL Stored Procedures in ADO. Hence you must use Command Objects to run Update, Delete, etc. queries.OS |
 |
|
Doug G
Constraint Violating Yak Guru
331 Posts |
|
|
|
|