|
-
Aug 2nd, 2000, 08:10 AM
#1
Thread Starter
Lively Member
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
-
Aug 2nd, 2000, 09:26 AM
#2
Fanatic Member
gerard
SOunds like your connection could be read only or something similar.
Can you post the connection code
Gary Lowe 
VB6 (Enterprise) SP5
ADO 2.6
SQL Server 7 SP3
OK I know my spelling and grammer is crap so don't quote me on it!
To err is human to take the P! is only natural !!
Click on the top section of image for Marcus Miller website and bottom section of image for 'Run For Cover' sound clip

-
Aug 2nd, 2000, 09:39 AM
#3
Thread Starter
Lively Member
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
-
Aug 2nd, 2000, 10:01 AM
#4
Fanatic Member
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.
Gary Lowe 
VB6 (Enterprise) SP5
ADO 2.6
SQL Server 7 SP3
OK I know my spelling and grammer is crap so don't quote me on it!
To err is human to take the P! is only natural !!
Click on the top section of image for Marcus Miller website and bottom section of image for 'Run For Cover' sound clip

-
Aug 2nd, 2000, 10:10 AM
#5
Thread Starter
Lively Member
Same message
Tried your suggest get same error..not sure what rs properties I may need to set..
-
Aug 2nd, 2000, 10:23 AM
#6
Fanatic Member
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
Gary Lowe 
VB6 (Enterprise) SP5
ADO 2.6
SQL Server 7 SP3
OK I know my spelling and grammer is crap so don't quote me on it!
To err is human to take the P! is only natural !!
Click on the top section of image for Marcus Miller website and bottom section of image for 'Run For Cover' sound clip

-
Aug 2nd, 2000, 10:26 AM
#7
Thread Starter
Lively Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|