Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reading a VFP table in VB
Message
From
08/03/1999 14:11:54
Becky Vidal
Heritage Information Systems, Inc.
Richmond, Virginia, United States
 
 
To
All
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Title:
Reading a VFP table in VB
Miscellaneous
Thread ID:
00195255
Message ID:
00195255
Views:
49
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
Next
Reply
Map
View

Click here to load this message in the networking platform