-
In big trouble here!!
I'm dealing with dBase V files...I can get a ADO connection no problem I can run basic select queries over them. BUT if I try an update or insert query over them I get the following error!!
- Operation must use an updatable query. -
Any ideas how I can get around this and run my action queries...!
Regards
Gerard
-
gerard
SOunds like your connection could be read only or something similar.
Can you post the connection code
-
Code
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Set cn = New ADODB.Connection
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\data\dbffiles\;Extended Properties=Dbase IV"
Set rs = cn.Execute("UPDATE NAMETBL SET NAMETBL.GIVENAME = 'Peter'")
cn.Close
Set cn = Nothing
-
gerard
have you tried just running the query i.e
Code:
cn.Execute("UPDATE NAMETBL SET NAMETBL.GIVENAME = 'Peter'")
'instead of
Set rs = cn.Execute("UPDATE NAMETBL SET NAMETBL.GIVENAME = 'Peter'")
If you try that and it works you may have to set some properties of the recordset first.
-
Same message
Tried your suggest get same error..not sure what rs properties I may need to set..
-
Sorry gerard
I can't think of anything that would cause the error.
It sounds like the connection is read only which would explain why the select query works.
I am not sure what properties you would have to set to make make sure the connection is read/write.
I remember somone else having a similar problem a while back but I'm not sure if it was resolved.
Come on guy's, li'l help
-