Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Visual Foxpro and OPC
Message
From
11/12/2001 06:23:26
 
 
To
11/12/2001 05:55:34
Albert Beermann
Piepenbrock Service Gmbh & Cokg
Osnabrück, Germany
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00592567
Message ID:
00592572
Views:
9
>Hi Foxpro Professionals !!
>
>I have to write an application in with i have to do some strange things with data from an SPS (roboter with video camera).
>The techi's who handle the SPS told me, that they would like to communicate with my database via OPC ?! They know some projects , where they have done this with an Visual Basic application !

Could they have said "ODBC"? If so, VFP's native file system can be accessed via ODBC (the other people use the VFP ODBC driver to talk to files native to VFP), and VFP can connect to another file system that provides an ODBC driver (the other programmers' file system is accessible through ODBC, and they can provide you with the driver for it, or there already is one installed on your system.)

ODBC is an older technology; the current incarnation of ODBC is called OLEDB (this is an oversimplification; OLEDB provides a significant superset of the functionality of ODBC and new syntaxes as well) and o used in conjunction with ADO. VFP can interact with data either through the traditional ODBC channels, or by instancing ADO recordsets.

To make matters least complex from your perspective, use VFP native tables, and provide them with the currently-released VFP ODBC driver, available from msdn.microsoft.com/vfoxpro - they work with your VFP tables in the same fashion that they would deal with any other ODBC data source, and you work with data in the DBFs as you are already accustomed to doing. This minimizes your learning curve to practically nothing.

If they have existing files that you have to communicate with from VFP, there are several approaches open to you. One is to use a VFP database container (DBC) with an ODBC connection to their data files, and you then create remote views of their data in the DBC. You manipulate remote views in much the same way you woukd a local view; if you are not accustomed to using buffered data sets and the TABLEUPDATE()/TABLEREVERT() operations, you'll have some learning curve, but not a great deal.

The other primary alternative is to use SQL PassThrough (SPT) - you create ODBC queries and operations using SQLExec() and the related family of functions; once the SPT operation takes place, the data is handled as a VFP cursor. This offers greater flexibility in terms of leveraging functionality that might not be native to VFP, but has more learning curve to it.

You can also create ADO recordsets via COM.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform