Tonatiuh
Jul 27th, 1999, 05:51 PM
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.
Dim dbFox as Database
Set dbFox = OpenDatabase("d:\code\tablas\contra2", , , "FoxPro 3.0;")
I get the Run-Time error: 3024
can't find the file 'd:\code\tablas\contra2'
and in this other way
Dim dbFox as Database
Set dbFox = OpenDatabase("d:\code\tablas\contra2.dbf", , , "FoxPro 3.0;")
I get the Run-Time error: 3343
Can't recognize the database format
'd:\code\tablas\contra2.dbf'
I set te Data control properties as follows:
Data1.Connect="FoxPro 3.0;"
Data1.DatabaseName="d:\code\tablas"
Data1.DefaultType=2 'UseJet
Data1.RecordSource=Contra2
The path and filename are perfectly correct.
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).]
Dim dbFox as Database
Set dbFox = OpenDatabase("d:\code\tablas\contra2", , , "FoxPro 3.0;")
I get the Run-Time error: 3024
can't find the file 'd:\code\tablas\contra2'
and in this other way
Dim dbFox as Database
Set dbFox = OpenDatabase("d:\code\tablas\contra2.dbf", , , "FoxPro 3.0;")
I get the Run-Time error: 3343
Can't recognize the database format
'd:\code\tablas\contra2.dbf'
I set te Data control properties as follows:
Data1.Connect="FoxPro 3.0;"
Data1.DatabaseName="d:\code\tablas"
Data1.DefaultType=2 'UseJet
Data1.RecordSource=Contra2
The path and filename are perfectly correct.
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).]