Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reports from a cursor
Message
 
À
27/10/2003 08:43:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Crystal Reports
Divers
Thread ID:
00842773
Message ID:
00843176
Vues:
20
Craig,

I'm correct. This library is built with FoxAPI and able to access internal VFP data. But in order to provide this access the connection to the provider must be established in VFP only. You can check the samples, included with OLEDB library (in DSO Samples folder), which demonstrate direct binding of ADO controls to VFP cursors.
Here is another sample to clarify the idea:
Select * from _Samples + "/data/customer" into cursor SomeCursor READWRITE 

o = CreateObject("OleDbFox.Utils")  && Not used, required to initialize FoxAPI
oConn = CreateObject("ADODB.Connection")
oConn.Open("Provider=MSDAOSP;Data Source=OleDbFox.DSObject;")
oRS = oConn.Execute("SomeCursor")

Go Bottom
? SomeCursor.Contact   && Result: Vladimir Yakovski

oRS.MoveLast
? oRS.Fields("Contact").Value  && Result: Vladimir Yakovski
Replace SomeCursor.Contact WITH "New value"
? oRS.Fields("Contact").Value  && Result: New value
oRS.Fields("Contact").Value = "ADO value"

? SomeCursor.Contact   && Result: ADO value
>Alexander,
>
>You are not correct. The OLEDB Provider gives access to tables and views, not cursors.
>
>>OLEDB library for VFP (file #10002) contains simple OLEDB provider, which provides direct access to the internal VFP cursors through ADO recordsets:
>>
>>loUtils = CreateObject("OleDbFox.Utils")
>>oRecordSet = CreateObject("ADODB.Recordset")
>>
>>lcConnString = "Provider=MSDAOSP;Data Source=OleDbFox.DSObject;"
>>oRecordSet.Open("Customer", lcConnString)
>>
>>First parameter in the Open() method is alias of cursor. After opening you can pass created recordset to the Crystal Reports.
>>You can also use CursorToRs methods in this library or VFPCOM utility.
>>
>>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform