Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reading a VFP table in VB
Message
De
08/03/1999 14:11:54
Becky Vidal
Heritage Information Systems, Inc.
Richmond, Virginie, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Titre:
Reading a VFP table in VB
Divers
Thread ID:
00195255
Message ID:
00195255
Vues:
50
I have written a program which creates an Access database dynamically and creates and adds various tables to the database. I want to read a VFP table and populate my access tables from it. I have the following code:

Dim tblLink As TableDef

vfpTable = "FoxProTable"
vfpConnect = "FoxPro 2.6;DATABASE="C:\temp" ' directory of table
vfpSource = "total_rank.dbf" ' vfp table

Set tblLink = dbs.CreateTableDef(vfpTable)
tblLink.Connect = vfpConnect
tblLink.SourceTableName = vfpSource
dbs.TableDefs.Append tblLink

Set rst = dbs.OpenRecordset(vfpTable)

I have previously dimensioned the vfp variables, opened my database as dbs and defined by recordset variable. I believe my problem is that my vfp table is not part of a database. I am not sure how to code this. The program seems to work until it reaches the Set rst statement. Can anyone help me?

Thanks
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform