[unixODBC-support] Status of the "txt" driver

Penz, Bernhard Bernhard.Penz at fabasoft.com
Wed Aug 10 15:19:27 BST 2005


Hi all,

I am trying to use the txt driver shipped with unixODBC to load data
from a CSV-File, but without success. When doing something, it always
says: 

SQL> CREATE TABLE TableName ( Col1 VARCHAR(100), Col2 VARCHAR(100) )
[ISQL]ERROR: Could not SQLPrepare

When compiling some stuff with trace messages turned on I get:

SQL> CREATE TABLE TableName ( Col1 VARCHAR(100), Col2 VARCHAR(100)
)[SQP][sqpOpen.c][39] BEGIN: 
[SQP][sqpOpen.c][67] END: 
[SQP][sqpParse.c][9] BEGIN: 
[SQP][sqpParse.c][15] END: 1 
[SQP][sqpError.c][7] BEGIN: 
[SQP][sqpError.c][12] END: syntax error processing 'SELECT' on line 1 
[SQP][sqpClose.c][11] BEGIN: 
[SQP][sqpFreeParsedSQL.c][14] BEGIN: hParsedSQL = (nil) 
[SQP][sqpFreeParsedSQL.c][20] END: nothing to do 
[SQP][sqpClose.c][119] END: Hopefully; memory is cleaned up. 
[ISQL]ERROR: Could not SQLPrepare 

My odbc.ini file contains the following section:

Description = ODBC for Text Files
Driver = Text
Database = /tmp/odbc/data
Trace = Yes
ColumnSeperator = ,
Tracefile = /tmp/odbc/trace.log
Username = Bernhard.Penz
Password = mysecret

My odbcinst.ini file looks as follows:

[Text]
Description = ODBC for Text Files
Driver = /usr/lib/libodbctxt.so
Setup = /usr/lib/libodbctxtS.so
FileUsage = 1
CPTimeout =
CPReuse =

Have I missed anything in my ini-files that will make the txt driver
work, or is it broken?

Regards,
Bernhard




More information about the unixODBC-support mailing list