Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADOVFP.H
Message
De
02/07/2001 10:50:03
 
 
À
30/06/2001 01:19:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Divers
Thread ID:
00525380
Message ID:
00525889
Vues:
16
>Still doesn't works...
>
>I have tried both
>
>#DEFINE adRecDeleted 0x0040000
>and
>#DEFINE adRecDeleted 4
>
>oConn = CreateObject("adodb.connection")
>oRS = CreateObject("adodb.recordset")
>
>oConn.Open("driver=SQL Server;server=pegasus;database=profert;uid=sa;pwd=;")
>
>oRS.Open("select * from ids",oconn,2,3)
>
>oRS.Delete
>
>? oRS.Status = adRecDeleted && it shows me .F.
>
>If I print ? oRS.Status, it shows me a 0
>
>Any more suggestions? Does anybody have a ADOVFP.H that really works in VFP?

I am certainly not qualified to help you much with ADO recordsets. I do think you need an 'oRS.update' line after the 'oRS.delete' to complete the deletion.

0x0040000 is the correct value for adRecDeleted (and that is not the same as #define adRecDeleted 4).

For some background info. on ADO read:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfoxgen/html/adojump.asp

Also, you might want to do some research on doing your create/read/update/delete (CRUD) operations with stored procedures on SQL server, rather than trying to do it through the recordset. I don't really have a specific place to point you to learn more about this method...maybe JC or someone else will jump in and give you more advice on this.
Steve Gibson
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform