>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.aspAlso, 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