I apologize for the bad title name - should've been Accessing VFP data from SQL Server. Sorry about that!
>I'm currently writing SQL script to access VFP data through the use of a linked server and found a couple of things of interest that I'm hoping someone could explain:
>
>1. Using the 4-part table reference (e.g. VFPDATA...Table), the ODBC driver is a lot faster than using OLE-DB. When using OPENQUERY to access the linked server's data, they're both similarly quick.
>
>2. In one part of my script I have to use the 4-part reference so I can use declared variables inside the query. When I issue a very simple query (or even just select fields without a WHERE clause) against a specific table using the 4-part ref against the ODBC linked server, SQL Server will come back with a C5 exception. Other tables in the database work just fine and the database itself is valid. When I try the same query w/4-part ref against the OLEDB linked server, it works fine.
>
>Any ideas??
>
>Laterness,
>Jon
>
>P.S. I'm brand new to script writing in SQL so if I'm doing something stupid I don't know about, cut me some slack. ;)
Jon Rosenbaum
Devcon Drummer