Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADO Connection Problem accessing a VFP table.
Message
From
26/09/2002 13:22:14
 
 
To
24/09/2002 17:44:52
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00704014
Message ID:
00704816
Views:
15
Try opening as table, and specifying static cursor in the open method. Assuming clientconfig is a table inside the DBC, the change would look like:
FPLrs.Open "clientconfig", FPLcn, adOpenStatic, adLockOptimistic, adCmdTable
HTH

>Here is the VB code I am using to access a VFP table contained in a database container. This code works fine when using Free tables with a slight modification to the connection string, but when using a container it errors on the delete. The error is listed below. So, my question is, how do you delete a record contained in a VFP database?
>
> FPLcn.ConnectionString = "Provider=vfpoledb;" & _
> "Data Source=C:\atps\data\clientconfig.dbc;" & _
> "Mode=ReadWrite|Share Deny None;" & _
> "Collating Sequence=MACHINE;" & _
> "Password=''"
>
> FPLcn.Open
>
> FPLrs.ActiveConnection = FPLcn
> FPLrs.Open "Select * from clientconfig.dbf", FPLcn, adOpenDynamic, adLockOptimistic, adCmdText
>
> FPLrs.MoveFirst
> Do Until FPLrs.EOF
> FPLrs.Delete
> FPLrs.MoveNext
> Loop
>
>Here is the Error Code:
>
>run time error 3251
>
>current recordset does not support updating. This may be a limitation of the provider, or the selected lock type.
Previous
Reply
Map
View

Click here to load this message in the networking platform