Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reports from a cursor
Message
 
To
27/10/2003 08:43:55
General information
Forum:
Visual FoxPro
Category:
Crystal Reports
Miscellaneous
Thread ID:
00842773
Message ID:
00843176
Views:
19
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.
>>
>>
Previous
Reply
Map
View

Click here to load this message in the networking platform