have anyone tried iOdbc with SqlAnywhere11?

Help
2009-11-06
2013-05-08
  • Michal Seliga
    Michal Seliga
    2009-11-06

    I have working SqlAnywhere11 installation in linux (ubuntu 9.10). i can create/work with databases using sybase tools.

    i have .odbc.ini:

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

    and .odbcinst.ini

       
        SQLAnywhere 11.0 = Installed
       
       
        Driver=/opt/sqlanywhere11/lib32/libdbodbc11.so

    now i can connect using sybase tools, for example by writing
        dbisql -c "dsn=synchronizacia11" (i run server manually). this works well

    but when i use iodbctest to try connection it always fails. it writes:

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

    does anyone know what else is needed to make it work?  this returned message looks like some nonsense to me….

    thanks in advance.

    (just in case that someone wants to try it, sybase server can be downloaded for free in evaluation version from http://www.sybase.com)

     
  • Michal Seliga
    Michal Seliga
    2009-11-07

    i have some news
    with cooperation with sybase forum there was solution - i had to use ansi version of driver provided by sybase, not defaultone which uses wchars. problem is that while iodbc expects wchars to be 4 bytes long, sybase works with ones like we know from windows, which are 2 bytes long

    so after change of driver iodbctest connects and works.

    unfortunately now all qt based applications i tried work only until the point where some query is executed - qt never gets any results. i don't know if its problem of some iodbc call, or in qt itself. is there anyone who could help me with this issue?