Discussion Locked

JavaScript ASP Database errors HELP!

0 helpful
11 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Whats wrong with this DB code? I cant insert, update or delete

SQL: oConnection.Execute ( 'UPDATE Members SET Hold=1 WHERE Email="' + sEmail + '"' );

11 replies

by chrandrob

Try reversing you use of single and double quotes:

SQL: oConnection.Execute ("UPDATE Members SET Hold=1 WHERE Email='" + sEmail + "'");

It would be easier to suggest a solution, however, if you told us what error you are getting.

by jasontik

Line 11 is:
oConnection.Execute ( 'UPDATE Members SET Hold=1 WHERE Email="' + sEmail + '"' );
The error is:

Microsoft JET Database Engine error '80004005'

Operation must use an updateable query. /jasontik/user.asp, line 11

by peyison

Try repairing your database. And make sure you're not opening the connection as read only.

by chrandrob

The error message helped a lot. That particular message generally indicates a permission issue. The database login you are using is not correct or does not have permissions to perform updates, inserts, and deletes.

If the login is correct but doesn't have proper permissions, you may be able to perform select and open statements but not the other types.

Check your connection parameters. If you are using a DSN, check that also.

This is what Microsoft has to say about it, and you can see it at http://support.microsoft.com/support/kb/articles/Q175/1/68.ASP

The above article was too long to paste in here.

This discussion is closed to new replies.