Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Extracting data from MDB to SQL 2000
Message
De
26/09/2005 06:16:36
Jon Neale
Bond International Software
Wootton Bassett, Royaume Uni
 
 
À
26/09/2005 05:22:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01052928
Message ID:
01052954
Vues:
10
There are probably many different ways to do this it depends on what your goals are and what you can do.

How much control will you have over your SQL Server? e.g. is it on a customers site, this will make setting up the linked server more difficult as the IT guy probably wont like it.

Test this, it will add a linked server and then you can query the data just like a normal SQL Table, the linked server isnt added at a database level its added to the SQL Server itself.
sp_addlinkedserver 'TestDB', 'Access 2003', 'Microsoft.Jet.OLEDB.4.0','c:\tmp\access.mdb'
sp_addlinkedsrvlogin 'TestDB', false, 'sa', 'Admin', NULL
select * from TestDB...Test && From Query Analyser
sqlexec(w_con,"SELECT * FROM TestDb...Test","New") && From VFP Need to create the connection

I would see you as having a few options:

Use ADO to connect to the Access database and do what you need to.
Write an SP with the OPENROWSET functionality to open the Access database and call that from VFP.
Add a linked server and query that from VFP.


Hope this helps a bit.

Jon

>Hi jon,
>
>I'm trying to retrieve some records from an access database and from there analyze the data then insert it into a sql table.
>
>Is using a linkedServer be the best solution to this?
>
>Thanks in advance...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform