Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADO Connection Problem accessing a VFP table.
Message
De
26/09/2002 13:22:14
 
 
À
24/09/2002 17:44:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00704014
Message ID:
00704816
Vues:
16
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform