Page 1 of 1

Problem connecting to DB2 via ODBC in 3.50.0.12

Posted: Sun 03 Oct 2010 18:44
by davort
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

Posted: Tue 05 Oct 2010 13:16
by AlexP
Hello,

I couldn't reproduce the problem.
Please send me a small project with your settings of UniDAC to alexp*devart*com, or tell me your UniDAC settings so that I could reproduce the problem.

Posted: Wed 06 Oct 2010 19:43
by davort
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

Posted: Thu 07 Oct 2010 09:48
by AlexP
Hello,

I have received your project, I can successfully connect to a DB2 database through ODBC driver.
Please tell which ODBC driver you are using, I tested your project using IBM DB2 ODBC DRIVER version 9.05.00.808.

Posted: Fri 08 Oct 2010 10:17
by davort
Yes, same here. 9.05.00.808.

Are there any special settings, that I could have them wrong?

Posted: Fri 08 Oct 2010 11:15
by AlexP
Hello,

No, I used UniDAC with default settings.

Posted: Sun 10 Oct 2010 13:26
by davort
:o ... ok, I will try something else. Thanks a lot anyway!


Best regards,

Davor