Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mystery Table Import Woes
Message
De
22/01/2006 19:30:33
 
 
À
22/01/2006 18:28:44
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01089237
Message ID:
01089261
Vues:
31
>So if you can pull them from Access... does Access see the whole dataset or you have to import table by table? If it does see them all, then when you pull up a connection to the Access' .mdb (via ODBC from fox), there should be some SQL* function to find all the tables in the .mdb - ah, here it is, SqlTables(). Then you should be able to pull them one by one automatically, and then repeat the proces only 19 times. So you'd only have to do the import to Access manually - despite my convictions (lazy programmer of the 2nd kind), it's not worth automating.
>
>If Access can import them only one table at a time... try to find a OleDb client for these tables. These should be freely downloadable.

Access can only import one table at a time short of using some VBA script. I considered your approach too, Dragan. Unfortunately, the 19 sets are from different versions of the software over the last ten years, and the data structure changes somewhat from one to another.

However, I've got a better answer now. Craig was right, and his comment prompted me to dig a little further with the ODBC approach. I used Mark McCasland's VPF ODBC class to create a full-blown DSN and then used that in SQLCONNECT and SQLEXEC, and it worked! So now I can write a procedure in VFP using ADIR() to loop through all the tables in a set and pull them into Fox.

I still don't understand why SQLSTRINGCONNECT() with the ODBC driver failed.
Ray Roper
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform