Information générale
Forum:
Microsoft SQL Server
Versions des environnements
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')
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement