Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using ADO to export VFP data
Message
 
To
10/06/1999 15:11:38
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00228406
Message ID:
00228545
Views:
13
If you go to www.msdn.microsoft.com/vfoxpro, there is a link to the VfpCom.dll.

I think the function is called RsToCursor. You can also convert a Cursor to a recordset with the CursorToRs function. You should be able to create your cursor in your VFP Component and use COPY TO to save your file to disk. Then convert the cursor to a recorset and pass that to the ASP page to display the links.

I thought you were transferring files between web servers. If you were, you would be better off using XML.

>Hi Tim
>The asp page instantiates the VFP com server and passes it the query string and the clients virtual 'download' directory. The VFP server uses the querystring to build the recordset and create 1 or more export files, storing the file count in an object property and the file names in an object array. After calling the server method to build the export files, the asp page loops through the file name array and creates a hyperlink to each file. The client can click on the hyperlinks to download the files immediately, or access their the download directory later to pick the files up.
>
>What is the VFP function that converts an ADO recordset to a cursor? Can I call this function directly from the VFP automation server?
>
>Thanks
>Bill
>
>>There is a function in the VfpCom dll that will convert an ADO Recordset to a VFP cursor.
>>
>>Once you get the file in the format you want, how are you getting the file to the client's system?
>>
>>>Hi Tim
>>>Funny you should ask. I was creating a VFP com server to export the recordset. I was passing the query parameters to the VFP server and having it create a cursor and export it to a file. It just seemed like a lot of overhead, creating a recordset in VFP that I already had in ADO - thought there might be a better way. If you don't mind me asking - is it a simple process to convert an ADO recordset object, passed to a VFP component, into a VFP cursor? Currently I am passing the query parameters used by the ASP page to the VFP server to create the cursor.
>>>
>>>Thanks
>>>Bill
>>>
>>>>Why not pass the ADO recordset to a VFP Component, Convert the Recordset to a VFP cursor, and then save the cursor to whatever format you need with the COPY TO VFP command?
Tim Westmoreland
Software Engineer
Skyline Technologies, Inc.

"Upper classes are a nation's past; the middle class is its future." - Ayn Rand, Russian-born author (1905-1982).
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform