Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Do I need/can I use ADO ?
Message
From
30/07/1999 11:40:00
 
 
To
30/07/1999 05:18:01
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00248083
Message ID:
00248219
Views:
14
>I'm testing remote automation. The goal is to setup an automation server to which you can SQL-selects commands and get back results. I've managed to do this using automation server, remote automation, etc ...
>
>In brief here's what the automation server does :
>- add to the selec - sql command : "into table c:\temptable"
>- execute the query
>- open the table with fopen, read in the whole table in one string
>- send this string to the remote client connected to the server
>
>Then client FWRITE's the string to it's local disk and hocus pocus : it works !! For now I didn't implement support for memo fields yet but an extension of this method should work ...
>
>Now the questions are :
>- are there concequences using the lowlevel filefunctions. It doesnt' seem to be the most elegant way ... (but it works ...)
>- is it possible to receive data directly into a cursor. For the client side ADO could come in the game, but I was wondering can ADO be implemented also in my automation server, or does ADO is a pure client thing not server ?
>- if ADO isn't a solution, are there besides the lowlevel filefunctions techniques that I could use to send over the data ? I'm thinking about routines that can convert a cursor into a single string and back ?

There's nothing wrong if you have the time to code for all possible scenarios. Let's say you're updating the table. You pass the whole thing back to the client, the client makes deletes, adds and edits to it. How do you handle deletes? If you really want to make it efficient, you would pass only the modified records. How do you know which records are new and which ones are edited?

My opinion is that, instead of investing a lot of time on creating a new way of doing things, spend a little learning existing ways that do the same and more than yours would in the immediate future.

Now, If you're trying receive data on the server directly into a VFP cursor the answer is no. From an ADO recordset, you have to convert with the VFPCOM utility. From a string or XML, you have to parse to your VFP cursor. ADO on the other hand will work on client and server. The downside of using ADO only is, you have to put aside your VFP cursor manipulation experience.
Previous
Reply
Map
View

Click here to load this message in the networking platform