[unixODBC-support] SQLPrepare error

Georges Racinet gracinet at nuxeo.com
Thu Dec 7 14:41:29 GMT 2006


On Dec 7, 2006, at 2:29 PM, Georges Racinet wrote:

> On Dec 7, 2006, at 2:25 PM, Nick Gorham wrote:
>
>> Georges Racinet wrote:
>>
>>>
>>>     I'm trying to connect to an iSeries/AS-400 server using  
>>> unixODBC.
>>>     I  must admit I'm quite new to the ODBC world.
>>>     unixODBC will be used from a python library (egenix' mxODBC),  
>>> but
>>>     that's another story.
>>>
>>>     The driver is correctly registered in /etc/unixODBC/  
>>> odbcinst.ini, and
>>>     it appears in the ODBCConfig graphical interface.
>>>     my odbc.ini file is well configured enough that I can browse the
>>>     tables in DataManager, but
>>>         - I don't see the frame where I'm supposed to issue SQL  
>>> statements
>>>       (compared to the screenshot from the online manual)
>>>         - Using isql, I get an "SQLPrepare, can't prepare" error.
>>>
>> Add the -v option to show any errors returned by the driver
>>
>> isql -v dsn user password

Here we go:

SQL> select * from TPDT
[S0002][unixODBC][IBM][iSeries Access ODBC Driver][DB2 UDB]SQL0204 -  
Error message text unavailable.  Message can not be translated  
successfully.
[ISQL]ERROR: Could not SQLPrepare

One more line, indeed. I just googled it again and got more lucky  
than yesterday. It seems a guy with same kind of setup as mine said  
it was solved by adding
	CCSID = 923
to his obbc.ini file (at least he got to a new error, probably a SQL  
syntax error of his)

http://www.developpez.net/forums/showthread.php?t=227837 (in french)

Now IBM's doc says, about CCSID = 923 that it's a charset  
specification for ISO 8859-15 (normal in a french context)
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp? 
topic=/rzahh/ccsidlist.htm

Did I get it right ? I just hope it's not just about converting the  
error message...

---------
Georges Racinet,   Nuxeo SAS
Open Source Enterprise Content Management (ECM)
Web: http://www.nuxeo.com/ and http://www.nuxeo.org/ - Tel: +33 1 40  
33 79 87






More information about the unixODBC-support mailing list