PDA

View Full Version : error 12290 - Adding New Connection for DB2



Samuel Pizarro
13-Jan-2017, 08:47 AM
Hi DAW:

Trying to add a new Connection to a DB2 database, under WebOrderMobile sample workspace, received this error when clicked in the "Select or enter a DB2 Data Source" combo-box.



C:\Program Files (x86)\DataFlex 19.0\Bin\Studio.exe
Impossível inicializar. Cannot allocate environment handle.

Error: 12290

Please report this error to Data Access Corporation

GET_REGISTERDRIVER (7955) - oConnection (592) - at address 40595
GET_LOADCURRENTDRIVER (15820) - oModifyConnections (1844) - at address 177460
GET_LOADCURRENTDRIVER (15820) - oDB2Group (1886) - in native code
GET_LOADCURRENTDRIVER (15820) - oDB2DSNCombo (1887) - in native code
MSG_FILL_LIST (4892) - oDB2DSNCombo (1887) - at address 177249
MSG_ONDROPDOWN (4573) - oDB2DSNCombo (1887) - at address 177269
MSG_COMMAND (648) - oDB2DSNCombo (1887) - at address 6925
MSG_CREATE_DIALOG (711) - oModifyConnections (1844) - in native code
MSG_CREATE_DIALOG (711) - oModifyConnections (1844) - at address 1489
MSG_ACTIVATE (117) - oModifyConnections (1844) - in native code
MSG_ACTIVATE (117) - oModifyConnections (1844) - at address 2257
MSG_POPUP (290) - oModifyConnections (1844) - in native code
GET_MODIFYCONNECTION (15830) - oModifyConnections (1844) - at address 177681
MSG_MODIFYCONNECTION (15832) - oConnectionsDg (1900) - at address 177995
MSG_MODIFYCONNECTION (15832) - oAdd_Btn (2018) - in native code
MSG_ONCLICK (4639) - oAdd_Btn (2018) - at address 177842
MSG_COMMAND (648) - oAdd_Btn (2018) - in native code
MSG_CREATE_DIALOG (711) - oConnectionsDg (1900) - in native code
MSG_CREATE_DIALOG (711) - oConnectionsDg (1900) - at address 1489
MSG_ACTIVATE (117) - oConnectionsDg (1900) - in native code
MSG_ACTIVATE (117) - oConnectionsDg (1900) - at address 2257
MSG_POPUP (290) - oConnectionsDg (1900) - in native code
GET_EXECUTE@0 (12154) - oStudioCommand (783) - at address 141440
MSG_ONCOMMAND@1 (12171) - oActionManager (633) - at address 87880
MSG_REQUESTCOMMAND (15239) - oConnectionManager_itm (996) - at address 160841
[start] - at address 247331



Everything was working fine until yesterday. But today I had to Install a new version of DB2. I had DB2 10.5 installed, and need to install DB2 11.1 and keep both versions running simultaneously. It Looks DAW CK stuff is not able to handle DB2 with multiple copies installed and running in parallel.

It also affected previous Workspaces created under 18.x, witch had connections properly configured to DB2 10.5 databases. On 18.2 Studio connection wizard,
you don't receive any error when click on DNS combo-box, but the list becomes empty, and the 'Test connection' button receives an error even if you try to type the database name manually. And finally, when trying to open the table inside the studio, you get:


Cannot open table number: 254. Database access has been disabled in this workspace due to a database login failure. You should close this workspace and fix the database login problem before continuing.


Please, need urgent assistance on this. Having multiple versions of database server running at same server is pretty common in a real world.

Regards

Samuel Pizarro
13-Jan-2017, 07:23 PM
Ok. Now I am getting worried.

I uninstalled the recent DB2 v11.1 that was installed today morning ; Left only the previous DB2 10.5 installation and default DB2 instance on the system like it was yesterday;
Tested DF stuff, but still facing same error.

Error: 12290 - Impossível inicializar. Cannot allocate environment handle.


So I decided to start it over. Uninstalled everything of DB2, all versions, all Instances, Cleaned the system completely from DB2 binaries and settings;
Restarted Windows;
Installed again, only the original DB2 v10.5 version on my system;
Restarted Windows again ;
Tested DF 18.2 and 19.0, and still same issue.

DB2 is apparently working properly.
I can use it normally without any issues from their regular interfaces;
I can connect to it from other 3rd party Tools (non-DataFlex) ;
I can connect to the databases using Excel via ODBC or OLEDB connection ;
I can connect to the databases using PowerShell, and .Net OldeDB interfaces ;

But still no joy with DF. :(

Can I have some more information on how DAW CKs driver load mechanism works internally in order to troubleshoot this ? And also what does this DF error 12290 means ?

Regards and thanks in advance!

Martin Moleman
16-Jan-2017, 03:26 AM
Strange problem. The error indicates your DB2 client setup is in error somehow.

Is the correct DB2 ODBC driver installed on this system? Maybe it is trying to use a 64-bit ODBC driver or something?

Can you create a DSN in ODBC administrator (32-bit) and testconnect with that?

The DB2 client has its own configuration files. Are these setup correct?

Nils G. Svedmyr
16-Jan-2017, 03:39 AM
I understand your grief. If you remember I also had problems with installing & running DB2 on my development machine a couple of weeks ago. I thought I had it fixed but not so much.

In the end I had to install DB2 on a virtual machine and run all tests from there. I think I tried installing both DB2 v 10.5 & 11 about 10 times (each) and rebooting between each step, de-installing removing all traces from DB2 on disk (including ProgramData & User data & registry) but still no luck.

Worked hard for over a week to try to get it working but no such luck. That's when I decided to give in and instead installed it on a virtual machine. Bit messy when testing because all code needs to be synchronized between the two machines each time, but at least I could run the tests.

I can imagine it is even tougher for you as that is your main development environment. Good luck to you.

Samuel Pizarro
22-Jan-2017, 06:42 PM
Sorry for the long delay to answer this back!

This one was really strange.

Martin, Obdc was working properly butvIveas indeed testing the 64bit interface!
When I tried to create a new DSN 32bit entry it was not working properly. Something got corrupted somehow abd I was not able to determine exactly where.
After one entire week trying to figure out I finally gave up !

I formated my entire system, reinstalled Win7 from scratch, reinstalled DB2 and DataFlex and have both working again now!

Regards

Samuel Pizarro
22-Jan-2017, 06:43 PM
Thanks Nils

But I had no luck this time. Had to fabric-restore my system.