Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Open a .DBC Data Base from VBA
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Open a .DBC Data Base from VBA
Divers
Thread ID:
00199272
Message ID:
00199272
Vues:
67
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
Répondre
Fil
Voir

Click here to load this message in the networking platform