fortypoundhead.com

dalebratton

Joined:
2013-07-17
16:57

Last Seen:
2013-09-13
13:42

Posted on:
2013-07-17
17:14

VB6 Connection w/ DB20 database w Win7 64 bit

Report Back to Forum Back to All Forums

Working on app at work in XP using VB6 and making DB connection & downloading data just fine. Got a WIN 7 laptop, installed VB6 with no issues (thanks for the tips) and tried to run the same code. When the code hits the DB.Open line, error indicated that the "...Data source name not found and no default driver specified." Connection string is as follows.... DRIVER={IBM DB2 ODBC DRIVER};PROTOCOL=TCPIP;HOSTNAME=;PORT=50000;DATABASE=DB20TCP;UID=" & UserID & ";PWD=" & UPW I did find that the drivers (db2cli.dll) from the XP machine were not on the WIN 7 machine and I DL'd them and installed them...correctly, I think (???). Used the ODBC Data Source Administrator to add the driver for both the 32 and 64 bit...correctly, I think(??). Still, continue to get the same error. Very frustrating as when more and more PCs migrate to WIN7, the app will crash. What do I need to do in order to get the code (and compiled exe) to connect to the DB2 database from a WIN 7 64 bit ?

dwirch

Joined:
2005-01-01
08:24

Last Seen:
2017-11-23
05:24

Posted on:
2013-07-17
18:12

Report Back to Forum Back to All Forums

Two points to address for troubleshooting:

I notice one thing missing from that connection string above - Hostname. Or did you remove it for security reasons?

Also, you might try making a system DSN through the ODBC control panel applet (Administrative Tools) using the same driver. If it is successful, you'll know that the driver is installed ok. If it fails (or doesn't show up in the list), well, the driver didn't get installed right.

dwirch

Joined:
2005-01-01
08:24

Last Seen:
2017-11-23
05:24

Posted on:
2013-07-17
18:14

Report Back to Forum Back to All Forums

If you're able to create the system DSN ok, and it tests good, you might try connecting through the DSN, maybe see if it works that way.

dalebratton

Joined:
2013-07-17
16:57

Last Seen:
2013-09-13
13:42

Posted on:
2013-09-13
11:13

Report Back to Forum Back to All Forums

Thanks for your reply....regarding the Hostname, it was left off intentionally.
Regarding your suggestions, I did get a successful connection. I noticed, too, from the OBDC Data Source Admin (User Data Sources window), that the driver was located in My Documents\Downloads folder. Evidently, I unzipped the file there stupidly and this is causing the problem. Where should this driver live? Then I'm presuming that if I unzip it at the correct location, my app will use the driver? And do I have to register the driver at the new location??....(I've had a bit of a brain dump since my original posting)

dwirch

Joined:
2005-01-01
08:24

Last Seen:
2017-11-23
05:24

Posted on:
2013-09-13
12:55

Report Back to Forum Back to All Forums

Drop it in C:\Windows\system32, and yes - you'll have to register it at that location, with regsvr32

You must be logged in order to post a reply.




Recent Forum Posts

Advanced search added
dwirch posted on September 23, 2017 at about 13:44 in Site News

Job Spammer: Gaurav Mehta - AgreeYa Solutions
dwirch posted on September 22, 2017 at about 10:35 in Spammers

Job Spammer: Prutha Siri - Javelin Systems
dwirch posted on September 10, 2017 at about 6:15 in Spammers

New security implemented
dwirch posted on September 7, 2017 at about 7:16 in Site News

Malicious IP Checker Companion Tool
dwirch posted on August 12, 2017 at about 20:24 in Site News

Job Spammer: Steve Adams
dwirch posted on August 8, 2017 at about 7:44 in Spammers