Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SqlAnywhere11 in Ubuntu 9.10 and ODBC, does it work for anyone?

87 views
Skip to first unread message

Michal Seliga

unread,
Nov 6, 2009, 2:49:24 PM11/6/09
to
hi

I have working SqlAnywhere 11 installation, this went flawlessly.
I source config script in .bashrc so environment is set
i am able to use sybase central or interactive sql to work with databases
i have .odbc.ini and .odbcinst.ini and content in them seems to be ok, because
interactive sql connects when server is running and i use dbisql -c "dsn=..."


.odbc.ini:
[ODBC Data Sources]
synchronizacia11=SQLAnywhere 11.0

[synchronizacia11]
UserID=HamSFA
Password=HamiltonSFA
ServerName=Synchronizacia11
Driver=/opt/sqlanywhere11/lib32/libdbodbc11.so

.odbcinst.ini:
[ODBC Drivers]
SQLAnywhere 11.0 = Installed

[SQLAnywhere 11.0]
Driver=/opt/sqlanywhere11/lib32/libdbodbc11.so

so to this point everything is ok. now next step is to make it work with generic
odbc. ubuntu 9.10 ships with iodbc.

when i try to use iodbctest to connect to database it fails. error message is
something strange:

1: SQLDriverConnect =
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
(-95) SQLSTATE=
1: ODBC_Connect =
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
(-95) SQLSTATE=

and here i am stuck. every odbc application i tried (iodbctest, sqlbrowser demo
from qt4, my own application) finishes like this or even crashes

question is
- did anyone tried it? is it possible to make it work?
- is problem in iodbc or in sqlanywhere11?


for now i am using evaluation version of sqlanywhere11 with latest available
ebf. so version is 11.0.1.2324

iodbc is in version 3.52.6-3ubuntu1 (taken from ubuntu 9.10 repository)

system is ubuntu 9.10 32bit with all available updates installed

i hope someone can guide me to working setup

thanks in advance
Michal Seliga

Ray Ruvinskiy [Sybase iAnywhere]

unread,
Nov 6, 2009, 2:55:39 PM11/6/09
to
Hi Michal,

The SQL Anywhere ODBC driver defines SQLWCHAR as a 2-byte quantity and uses UTF-16 to store wide strings. iODBC defines SQLWCHAR as a 4-byte quantity and uses UTF-32. Furthermore, iODBC maps the the
application's narrow calls to wide calls if the underlying driver supports Unicode. For that reason, our regular driver does not work with iODBC, even if your application does not make wide calls.

If your application does not make wide calls, you can use libdbodbcansi11_r.so, which is an ANSI-only version of our driver, with iODBC. It is included as of SQL Anywhere 11.0.1.2279.

Ray

0 new messages