Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Open a .DBC Data Base from VBA
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Open a .DBC Data Base from VBA
Miscellaneous
Thread ID:
00199272
Message ID:
00199272
Views:
66
Hi everyboy !

I'm not sure if my question goes here or on the VB discussion group, so I'll try here !

I open a FoxPro database in VBA(Excel) with teh following syntax :

Dim MyFoxProBD As Database
Dim MyFoxTable As Recordset

Set MyFoxProBD = OpenDatabase("c:\FoxProBD.dbc",dbDriverComplete,True,"FoxPro DBC;UID=;PWD=;")

Set MyFoxTable = MyFoxProBD.TableDefs("FoxTable").OpenRecordset(dbOpenTable)

At this moment, everything is ok and I can retrieve informations from my FoxPro table...
The problem is when I try to set my index...

MyFoxTable.Index = "MyIndex"
MyFoxTable.Index = MyFoxProBD.TableDefs("FoxTable").Indexes("MyIndex")
MyFoxTable.Index = MyFoxProBD.TableDefs("FoxTable").Indexes("MyIndex").name

I get an error with any of these 3 lines. Of course, MyIndex is a valid Index Tag in my .CDX. When I print the .Indexes.("MyIndex").name , it returns the correct Index Tag...

Any ideas ???

Thanks in advance

Benoit Grenier
********************************************

Benoit Grenier


encoder@silogic.ca (Job)
encoder@sympatico.ca (home)
Web site : www.silogic.ca
Reply
Map
View

Click here to load this message in the networking platform