Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Import from vfp tables
Message
From
12/05/2008 14:41:36
Issam Mansour
Jordan Business Machines
Amman, Jordan
 
General information
Forum:
Microsoft SQL Server
Category:
Import/Export
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01316356
Message ID:
01316466
Views:
19
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
Map
View

Click here to load this message in the networking platform