General information
Forum:
Microsoft SQL Server
Environment versions
SQL Server:
SQL Server 2005
any way thanks, Reading VFP tables directly from within SQL2005 found the following:-
-Reading VFP tables directly from within SQL2005 (LinkedServer,OpenRowSet,OpenDataSource)
This in itself have more than one ways some of which require that you must first enable OpenRowSet/DataSource from SQL server configuration (either from Start\Programs\.. or from within SQLserver).
A sample with linked servers. You create the linked server like this:
EXEC sp_addlinkedserver
@server = N'MYVFPSERVER', -- Your linked server name here
@srvproduct=N'Visual FoxPro 9', -- can be anything
@provider=N'VFPOLEDB',
@datasrc=N'"C:\PROGRAM FILES\MICROSOFT VISUAL FOXPRO 9\Samples\data\testdata.dbc"'
Once it's created you can do queries from it as if it were a SQLServer database. ie: Create and load data into our VFPTransferDb created above:
use VFPTransferDb
go
select *
into VFPCustomer
from
OpenQuery( MYVFPSERVER, 'select * from Customer')
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only