Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL DAO Question?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,

I am trying to use a DAO to connect to an ODBC (LocalCCSys)
I do connect but when I try to execute a SQL statement I get the next run-time error

Set dbCCSys = OpenDatabase("LocalCCSys", False, _ False, "ODBC;UID=;PWD=")

strSQL = "DELETE FROM CUTPLANTEMP"
dbCCSys.Execute strSQL

Run-time error '3075' Syntax error (missing operator) in query expresion 'Operation must use an updatable query'

I look for this error and it seems that the main reason is that the database was opened read-only.

I don't know how to change the database read-only property

Could anyone help me and tell how to avoid this error, please?

Thanks a lot

 
The UID that you open your database with needs to have Read/Write access. I've run into the problem when I've opened a database with a UID that was read-only.
 
The UID that you open your database with needs to have Read/Write access. I've run into the problem when I've opened a database with a UID that was read-only. Make sure that UID has had the correct privileges GRANTED to it.
 
Hi to all.

Your SQL statement (strSQL = "DELETE FROM CUTPLANTEMP") does not tell what to delete. If you want to delete everything, then:
strSQL = "DELETE* FROM CUTPLANTEMP"
or if you want to delete only certain part of it:
strSQL = "DELETE* FROM CUTPLANTEMP "
strSQL = strSQL & "WHERE x = " & txt.Text

Hope that helps.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top