Text - ODBC Driver - VB 3.0 to VB 4.0

Text - ODBC Driver - VB 3.0 to VB 4.0

Post by Chetan Rava » Thu, 27 Feb 1997 04:00:00



Hi,

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.


thanks

Chetan

 
 
 

Text - ODBC Driver - VB 3.0 to VB 4.0

Post by Geoff Shepher » Sat, 01 Mar 1997 04:00:00


Make sure your application INI file has the following in it (or similar):
[Installable ISAMs]
Text=C:\WINDOWS\SYSTEM\MSTX2016.DLL

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:
[Text ISAM]
Extensions=asc,csv,tab,txt
ColNameHeader=True
Format=CSVDelimited
MaxScanRows=25
CharacterSet=OEM

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



> Hi,

> 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.


> thanks

> Chetan


 
 
 

1. Text - ODBC Driver - VB 3.0 to VB 4.0

Hi,

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.


thanks

Chetan

2. Help with Load variable statement

3. Help please: VB 3.0 pro to VB 4.0 pro

4. Help I ve just delete pg_xlog

5. Trouble Porting VB 3.0 SQLServer App to VB 4.0 and Oracle

6. ODBC Connection to SSL SQL Server

7. update method in vb 3.0 vs vb 4.0

8. execution time?

9. VB 3.0 to VB 4.0 problem

10. Will VB 3.0 DLLs Overwrite VB 4.0 (32 bit) DLLs

11. Converting VB 3.0 app to VB 4.0

12. VB 4.0/5.0 RDO and Sybase SQL Server System 11/Intersolv ODBC 3.0