I have a problem to open a FoxPro database in VB5 enterprise. I get two diferente error messages in this two ways to write the instruction.
I get the Run-Time error: 3024Code:Dim dbFox as Database Set dbFox = OpenDatabase("d:\code\tablas\contra2", , , "FoxPro 3.0;")
can't find the file 'd:\code\tablas\contra2'
and in this other way
I get the Run-Time error: 3343Code:Dim dbFox as Database Set dbFox = OpenDatabase("d:\code\tablas\contra2.dbf", , , "FoxPro 3.0;")
Can't recognize the database format
'd:\code\tablas\contra2.dbf'
I set te Data control properties as follows:
The path and filename are perfectly correct.Code:Data1.Connect="FoxPro 3.0;" Data1.DatabaseName="d:\code\tablas" Data1.DefaultType=2 'UseJet Data1.RecordSource=Contra2
If I elimiate this conflictive line, and just link a TextBox to the first field of Data1 control, everything works OK and I can see data from the database. But, I need to define a recordset to update, apped, etc.
What's happening?
Any idea will be appreciated!
Ulises
[This message has been edited by Tonatiuh (edited 07-28-1999).]




Reply With Quote