Hi, the new Unidac lib on Delphi XE, throws me an error when trying to connect to a DB2 database over ODBC connection.
After filling in the information on Login form, and then clicking on Connect, I get the error:
[Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed.
Then I click on the OK and since that moment, every subsequent click on Connect throws:
[IBM][CLI Driver] SQL1031N The database directory cannot be found on the indicated file system. SQLSTATE=58031.
After exiting Delphi XE IDE and then reloading it, the cycle repeats (first SQL_HANDLE_ENV error, and then CLI Driver error).
Version 3.00.0.9 under Delphi 2007 still works fine, with all of the parameters set exactly the same as in Delphi XE and 3.50.0.12 Unidac.
What am I doing wrong? Should I change some compiler parameters in Delphi XE? Or is it actually a bug?
Workstation: Windows 7 Ultimate 32-bit, 3 GB RAM
RAD Studio XE build 15.0.3890.34076
IBM DB2 V 9.5, running on a Windows 2003 Server, 16 GB RAM
Thank You very much on Your prompt response!
Best regards,
Davor Tavcar
Problem connecting to DB2 via ODBC in 3.50.0.12
I prepared the exact example and sent it to Your mail.
I have a Firebird database with the data I need to send to DB2 database - a once only job, afterwards everything will be running via WebServices ...
The project I sent you is the same that gives me trouble. I guess You should prepare a DB2 connection via ODBC, that successfully connects to the DB2 server, and then try the same via my code ... I don't doubt that You'll be able to spot my mistake in no time ...
Thanks in advance!
Dave
I have a Firebird database with the data I need to send to DB2 database - a once only job, afterwards everything will be running via WebServices ...
The project I sent you is the same that gives me trouble. I guess You should prepare a DB2 connection via ODBC, that successfully connects to the DB2 server, and then try the same via my code ... I don't doubt that You'll be able to spot my mistake in no time ...

Thanks in advance!
Dave