Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFPCom.ComUtil Problems
Message
 
To
19/01/2003 23:22:33
David Mckay
Australian Workplace Software
Sydney, Australia
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00743362
Message ID:
00743393
Views:
19
Hi,

You could try to use file #10002 instead of VFPCom. All you need is replace class name "VFPCom.ComUtil" in your code with "OleDbFox.Utils".
This library provides also another way to pass VFP data as ADO cursor - OLEDB provider DSObject. The advantage of this way is that it returns server-side ADO cursor, it not creates ADO client cursor and do not spend time to populate it. It simply returns data from any opened in VFP cursor when it required. Here a simple sample:
Clear All
lcConnString = "Provider=MSDAOSP;Data Source=OleDbFox.DSObject;"

use _Samples + "\data\orditems" In 0
use _Samples + "\data\orders" In 0
use _Samples + "\data\customer" In 0
use _Samples + "\data\country" In 0

* Required to initialize OLEDBFOX library
o = CreateObject("OleDbFox.Utils")

oRS1 = CreateObject("ADODB.Recordset")
oRS1.Open("country", lcConnString)
oRS2 = CreateObject("ADODB.Recordset")
oRS2.Open("orders", lcConnString)
oRS3 = CreateObject("ADODB.Recordset")
oRS3.Open("orditems", lcConnString)
oRS4 = CreateObject("ADODB.Recordset")
oRS4.Open("customer", lcConnString)

?oRS1.Fields(0).Value
?oRS2.Fields(0).Value
?oRS3.Fields(0).Value
?oRS4.Fields(0).Value
>1. I am having some trouble with the VFPCom.CursorToRS() function. The problem is that it creates the recordset with the wrong field attributes eg memo ado constant is 201 but it makes it 129 and sets the defined length to 256 so then the data gets truncated.
>
>2. The next problem is that when you have multiple memo fields but you only fill in one memo field of the cursor, when running the cursortors() it replicates the data from the memo field filled in to the other memo fields even though they are blank. We're using VFP7 with the COMUtils we also set the null values on all memo fields. We came across these problem when setting the recordset data for the crystal reports.
Previous
Reply
Map
View

Click here to load this message in the networking platform