Page 1 of 1

Problem with connection to DB2

Posted: Thu 07 Apr 2011 08:34
by softwestteam
I installed DB2 Express-C on my Delphi station. I create a new database and I try to connect my application to that database but I get this error

[IBM][CLIDriver] CLI0124E Invalid argument value. SQLSTATE=HY009

Uniconnection Configuration:

ProviderName=DB2;
Database=newdatabase;
host=localhost;
port=50000;
username:db2admin;
password=1;

What I'm doing wrong?

Posted: Fri 08 Apr 2011 08:52
by AlexP
Hello,

Probably, the problem is connected with the database settings.
Please try to connect to your database over standard IBM DB2 Control Center, if you get the same error please check your database settings, otherwise contact us again.

DB2 Control Center works

Posted: Fri 08 Apr 2011 09:00
by softwestteam
DB Control Center works.. I create databases, tables,users...but when I try to access a database with Unidac I get that error...

Posted: Sat 09 Apr 2011 14:43
by softwestteam
I'm running out of time .. Help please?
Thanks

Posted: Mon 11 Apr 2011 08:59
by AlexP
Hello,

To solve the problem you should use your database alias instead of the server name like

UniConnection1.Server:= 'TOOLSDB';

It work!

Posted: Mon 11 Apr 2011 09:38
by softwestteam
It work
Thanks a lot!!!

Posted: Mon 11 Apr 2011 09:51
by AlexP
Hello,

Glad to see that the problem was solved. If you have any other questions, feel free to contact us.

Posted: Mon 11 Apr 2011 17:34
by softwestteam
Hello
I have another problem
When I use a UniLoader I get this error.


[IBM][CLI Driver][DB2/NT] SQL0302N The value of a host variable in the EXECUTE or OPEN statement is out of range for its corresponding use.SQLSTATE=22001

The table that is loaded is very big (over 200.000 records)
With other database like Firebird, SQLite, PostgreSQL it work.

Thanks

Posted: Tue 12 Apr 2011 11:36
by AlexP
Hello,

I could not reproduce the problem.
I have tested it on a table with more than 200 000 records, and all works fine.
Maybe the problem isn't connected with the number of records, maybe it's connected with some values or types of fields in the table.
So please provide the script to create the table.

Posted: Tue 12 Apr 2011 12:38
by softwestteam
I enlarged some string fields and everything it's working now.
It's interesting because I load a DBF table that have the exact structure as the DB2 table
Thanks a lot!!!

Posted: Tue 12 Apr 2011 12:52
by AlexP
Hello,

Nice to hear that you solved the problem.