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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No updates, deletes or inserts are allowed in SQLPrepare

Status
Not open for further replies.

Kendel

Programmer
Apr 24, 2002
1,512
US
I'm trying to insert a record to a db and I got this error.
Code:
Set con = Server.CreateObject("ADODB.Connection")
con.Open "DSN=MyDB;uid=myuid;pwd=mypwd"
con.Execute("insert into myTable values (...,...,blab,blab)")

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[CA][ODBC CA-Datacom/DB Driver] No updates, deletes or inserts are allowed in SQLPrepare

The Select statement works just fine. Does anyone know what the problem is? Thanks.


 
No, it's not the permission issue. I'm switching from EDBC to ODBC driver using the same DB. Didn't have any problem with EDBC.

P.S. It's good to see you are still in this forum. It's been a long time.
 
i think it has to do with your connection string.
try adding "Initial Catalog=<yourdatabase>"
and fiddle with "integrated security="
 
Like this:

"Initial Catalog=<myDB>;DSN=myDSN;uid=myUid;pwd=myPwd;integrated security="

 
integrated security=SSPI;

i never ever saw that SQLPrepare error so i'm just guessing here. I do not know "CA-Datacom/DB". Is it possible to login as "myuid" via DSN=MyDB and fire
("insert into myTable values (...,...,blab,blab)") ?

In DBMS systems like Oracle and MSSQL it is possible to define permissions (SELECT, INSERT, UPDATE, etc) on table level.

So check the permissions of myUid on the database side.
If that looks good, then the connection string maybe the problem.

Maybe this URL is helpfull:
[link]
[/url]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top