Make sure your application INI file has the following in it (or similar):
Secondly, in my app (which also directly reads text database files) I had
to add to following to the main form load event:
'Set DB AppINIPath
DBEngine.IniPath = App.Path & "\" & APP_INIFILE
(Note, app cannot be installed in a root directory with about code)
This tells the database engine what INI file to look in for the above
setting. The const APP_INIFILE is set to "MYAPP.INI" (for example).
You might also want to include a Text ISAM settings section such as:
Good luck with your project!
I'm having a problem myself - if I use a data control to open a text
database file, it leaves the file locked somehow. Very irritating. Have you
run into this at all?
.. Geoff Shepherd
> I have an application in VB 3.0 which I am trying to convert to VB 4.0
> In my VB 3.0 application, I was using Text ODBC driver to open a .txt
> file as a table using schema.ini
> Now when I compile the same code in VB 4.0 16 bit, it comes out and says
> cannot find "xyz". This "xyz" was my DSN for the text file that I would
> specify my program to open as a table. Apparently, instead of seeing
> the DSN as DSN in VB 4.0, it is looking at it as some database file
> itself. I also tried using new syntax of VB to open the file
> Set MyDB = OpenDatabase("C:\MyTXTFile", False, False "text;")
> Then it came out and gave me a message saying unable to find installable
> ISAM file.
> Anybody out there has any clue as to what am I doing wrong? or what
> should I exactly do to make this work in VB 4.0 16bit?
> Would appreciate your help.