Windows 7 - ODBC Connect to DB2

General discussion forum about all databases other than SqlBase.
ploetner

Windows 7 - ODBC Connect to DB2

Post by ploetner » 12 Nov 2012, 13:43

Hello,
we have tried to connect to a z/OS DB2 Database via ODBC.

After Installation of the DB2 Connect 64 Bit Client, the connection test from System was successfully.
But from the Application and from SqlTalk.exe we got the error -26532 can not open database.
We use the same SQL.INI file, that we use with Windows XP.

Code: Select all

[sqlsgtwy]
locktimeout=180
longbuffer=32760
[win32client]
clientname=Win32User
retry=1
SetZeroLengthStringsToNull=1

[win32client.dll]
comdll=sqlodb32
comdll=sqlws32

[win32client.ws32]
;    SQLBase
serverpath=WBLN805,9.156.237.109,2155/GB00ED1C,GBZEIOD2

[odbcrtr]
remotedbname=DB2EODBC, DSN=DSNE
What is the difference we have to attend to?

Jeff Luther

Re: Windows 7 - ODBC Connect to DB2

Post by Jeff Luther » 14 Nov 2012, 02:02

We use the same SQL.INI file, that we use with Windows XP.
But what is the DB2 Connect client you have installed on your XP machine? My first guess, is that 64-bit isn't supported... and in fact if you click here:
http://www.guptatechnologies.com/Produc ... atrix.aspx

and then click 6.1 Win32 you'll see that 32-bit ODBC clients only are supported.

User avatar
markus.essmayr
Site Admin
Site Admin
Austria
Posts: 892
Joined: 06 Mar 2017, 06:07
Location: Austria

Re: Windows 7 - ODBC Connect to DB2

Post by markus.essmayr » 14 Nov 2012, 10:28

Addon to Jeff's comment:

TD applications run as 32 Bit processes.
Windows doesn't support to mix 32 and 64 Bit DLLs in a process.
Thus, a 32 Bit application can only use 32 Bit DLLs.
As the DB2 client is a set of DLLs, you may try to use the 32 Bit DB2 client.
Maybe it supports a side-by-side installation 32/64 Bit!?

Max
Markus Eßmayr
teamdeveloper@t-mx.com

TomH

Re: Windows 7 - ODBC Connect to DB2

Post by TomH » 26 Nov 2012, 15:47

Just to add to the above comments...

We connect to an iSeries DB2400 database through ODBC, and on 64bit machines, the connection does require that the datasource entries in the registry reside in the 32bit section of the registry rather than the 64bit section ("SOFTWARE\Wow6432Node\ODBC\ODBC.INI" vs. "SOFTWARE\ODBC\ODBC.INI").

Tom

User avatar
markus.essmayr
Site Admin
Site Admin
Austria
Posts: 892
Joined: 06 Mar 2017, 06:07
Location: Austria

Re: Windows 7 - ODBC Connect to DB2

Post by markus.essmayr » 27 Nov 2012, 07:46

@Tom: Looks like you're using the 32 Bit DB2 client on your 64 Bit machine.

I've done that with SQLBase recently.
I installed the 32 and 64 Bit ODBC drivers side-by-side on one machine.
Each bit version has it's own installation directory and it's own registration area in the Windows registry.
Also the ODBC "SYSTEM data sources" are registered in different places (32 in 32 section, 64 in 64 bit section).

That allows me to create 32 and 64 bit ODBC data sources with the same name so any application can connect to "the same" data source automatically using the correct driver version.
(That doesn't work with "USER data sources"!)

Max
Markus Eßmayr
teamdeveloper@t-mx.com

ploetner

Re: Windows 7 - ODBC Connect to DB2

Post by ploetner » 27 Nov 2012, 10:47

Hello Tom,

we have had in \HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI\ODBC the entries
  • TraceDll
    TraceFile
and have moved this Entries to the Key \HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\ODBC
without success.
It dosn't work in both cases. I believe this entries only used for trace.

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests