Hi, I have installed sql anywhere 16 in linux machine. Below is the content of my odbc.ini file. I have written the odbc program to access the demo database(which came as part of sql anywhere16 installation). While running the program am getting the error message - "NOTICE: IM004:1:0:[unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed". [SQL Anywhere 16 Demo] UID=DBA PWD=sql DatabaseFile=/home/vaish/sqlanywhere16/demo.db ServerName=demodb Port = 2638 StartLine=/home/vaish/sqlanywhere16/bin32/dbeng16 Description=SQL Anywhere 16 Sample Database Driver=/home/vaish/sqlanywhere16/lib32/libdbodbc16.so Can anyone help me to identify the problem with my settings? Thanks, Vaish |
ODBC connection failures If you do not deploy all the files required for the ODBC driver, you may encounter the following error when attempting to connect to a database. [IM004][Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed Check that you have installed all the files required for the correct operation of the ODBC driver. PS. I recently added this to the SQL Anywhere documentation. You'll see it in some new release.
(19 Nov '13, 11:39)
JBSchueler
|
Can you show us your code? Which call is getting the error? Which build number (of the ODBC driver) are you using? What bitness are you using - 32 or 64?
;; This buffer is for notes you don't want to save, and for Lisp evaluation. ;; If you want to create a file, visit that file with C-x C-f, ;; then enter the text in that file's own buffer.
Hi , My code is below:
It fails in - SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &env); Am working on 32 bit. And the ODBC driver is the one which came along with sqlanywhere16 installation . My Linux distro is - Red Hat Enterprise Linux Server release 5 (Tikanga).
Also, If you could tell me the procedure to run the sample programs given in path - sdk/dbcapi/examples/ in linux, it would be very helpful. My attempt to compilation with this command - gcc -I/home/vaish/sqlanywhere16/sdk/include/ -I/usr/include/ -L/usr/local/lib/ -L/usr/lib/ -Llibdl.so connecting.cpp -o connecting
failed with below errors:
Thanks , Vaish
Hi, Basically I need to connect to sybase database in Linux via C programming in linux. I searched on the net and found only tutorial for programming in windows environment/C++ programming. So , If there is any good documentation on connecting sybase in linux C programming , plz share me the link. It will be of great help. Thanks, Vaish