Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Import from vfp tables
Message
De
12/05/2008 14:41:36
Issam Mansour
Jordan Business Machines
Amman, Jordanie
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Import/Export
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01316356
Message ID:
01316466
Vues:
20
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
Fil
Voir

Click here to load this message in the networking platform