MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Error Connecting to z/OS DB2 from MS Access

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
RoyKMathur
Beginner


Joined: 05 Jan 2012
Posts: 47
Topics: 11

PostPosted: Fri Apr 05, 2019 8:59 am    Post subject: Error Connecting to z/OS DB2 from MS Access Reply with quote

Hi, I'm getting an error when I attempt to connect to z/OS DB2 from MS Access.

My PC is running Windows 10 64-bit Build 16299 and Microsoft Access 2016 MSO (16.0.8431.2046) 64-bit.

I have checked the ODBC DB2 64-bit "System Data Sources" by executing c:\windows\system32\odbcad32.exe and can connect to the DB2 environment, DB2U, from within odbcad32.exe.

In MS Access, to connect to DB2 I did the following:
1. Click on the "External Data" tab
2. Click on "New Data Source"
3. Click on "From Other Sources"
4. Click on "ODBC Database"
5. Click on "Link to the data source by creating a linked table". A "Select Data Source" window pops up.
6. Click on the "Machine Data Source" tab.
7. Scroll down "System Data Sources" to the DB2 environment I desire, DB2U, to open and click on it. It is 64-bit.
8. At which point I get an error window:
ODBC--call failed.
Specified driver could not be loaded due to system error 1114: A dynamic link library (DLL) initialization routine failed. (IBM DB2 ODBC DRIVER 0 DB2COPY1, C:\PROGRA~1\IBM\SQLLIB\BIN\DB2CLIO.DLL). (#160)

I then executed c:\windows\sysWOW64\odbcad32.exe directory and created a 32-bit driver for the DB2 Environment, which I named DB2USER. When I attempt to connect to it, using the same steps I outlined above (except I click on DB2USER, not DB2U), I get an error window:
ODBC--call failed.

I then requested temporary full Administrator rights from the appropriate team in my company and opened MS Access as an Administrator. When I attempt to connect to DB2U (64-bit), I get the exact same error window as specified above in 8.

I then used the steps outlined above, but selected DB2USER (32-bit) instead, and was then able to view the z/OS DB2 tables, for which I selected one of them. I can then view the data; however I cannot INSERT/DELETE any rows. Which I need to be able to do.

So, then I re-opened MS Access with normal authority (non-Admin), and I tried to fix the link to the z/OS DB2 table:
1. By right-clicking on the linked table
2. Then clicked on "Linked Table Manager", at which point a "Microsoft Access Security Notice" window pops up warning me that it's possible the content is untrustworthy, blah, blah, blah.
3. Click the "Open" button
4. Click on the little box to the left of the table name, which has to the far right "DSN=DB2USER
5. Click on the "Ok" button, at which point the "Select Data Source" window pops up (see the first 5. above)
6. I select "DB2USER"
7. And an error window pops up:
Microsoft Access has stopped working
Windows can try to recover information and restart the program
8. And it gives me choices to click on:
Restart the program
Debug the program

When my PC was Windows 7, I was able to connect and INSERT/DELETE without any difficulty, and without needing Admin authority.

Does anyone know how to get this working?

Thanks, Roy
Back to top
View user's profile Send private message
misi01
Advanced


Joined: 02 Dec 2002
Posts: 616
Topics: 171
Location: Stockholm, Sweden

PostPosted: Sat Apr 06, 2019 2:56 am    Post subject: Reply with quote

Re, Windows 7 working, but not 10.

Have you only upgraded the OS or did you get a new PC at the same time?

If the latter, can your sys prog see if there's a RACF problem connected to the "name" of your PC?
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12366
Topics: 75
Location: San Jose

PostPosted: Sun Apr 07, 2019 4:21 pm    Post subject: Reply with quote

RoyKMathur,

Your windows 10 built in firewall might be blocking the service.

You can change the permissions by going to

1. Open Control Panel
2. Choose System and Security
3. Choose Windows Defender Firewall
4. Choose Allowed Apps and search for odbcad32 and give access to both private and Public. Similarly check "File transfer program" to ensure that it allows the data transfer
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
RoyKMathur
Beginner


Joined: 05 Jan 2012
Posts: 47
Topics: 11

PostPosted: Mon Apr 08, 2019 10:58 am    Post subject: Reply with quote

My PC was re-imaged with Windows 10 64-bit and MS Office 64-bit at the same time.

Last week, using IBM Data Studio 4.1.3, I was able to connect to z/OS DB2 when I was given temporary Admin rights, but since they are gone, I am unable to connect. I can see that the definition that I set up has somehow been changed, so no wonder I can no longer connect using IDS 4.1.3.

I can still connect to z/OS DB2 using the 64-bit odbc data source administrator program.

I checked Windows Defender and it says: "Windows Firewall is turned off and is currently being managed by your system administrator."

At this point I think I'm going to stop using MS Access and just re-write our process to use a C# program to access the z/OS DB2 tables.

I wish I could copy/paste screen-prints into this message.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12366
Topics: 75
Location: San Jose

PostPosted: Mon Apr 08, 2019 11:27 am    Post subject: Reply with quote

RoyKMathur wrote:
I wish I could copy/paste screen-prints into this message.


Are you planning to attach screenshots? or if just plan to post code/messages then you can use code tags to retain the spacing.

Check this link for an example.
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12366
Topics: 75
Location: San Jose

PostPosted: Mon Apr 08, 2019 11:31 am    Post subject: Reply with quote

RoyKMathur,

You also might want to check this out



Link to the original topic.

https://www.ibm.com/support/knowledgecenter/en/SSMKHH_9.0.0/com.ibm.etools.mft.doc/ah14442_.htm
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
RoyKMathur
Beginner


Joined: 05 Jan 2012
Posts: 47
Topics: 11

PostPosted: Mon Apr 08, 2019 11:31 am    Post subject: Reply with quote

I don't know how to attach screenshots. I have attempted to copy/paste them into this box where I type these words, but it doesn't work. I don't see an option that allows me to attach documents.

I also don't see the link you recommended that I click on to see an example. Perhaps I need to change some settings?
Back to top
View user's profile Send private message
RoyKMathur
Beginner


Joined: 05 Jan 2012
Posts: 47
Topics: 11

PostPosted: Mon Apr 08, 2019 11:33 am    Post subject: Reply with quote

Thank you, yes, I've read that IBM article last week. It didn't help me solve my problem.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12366
Topics: 75
Location: San Jose

PostPosted: Mon Apr 08, 2019 11:33 am    Post subject: Reply with quote

RoyKMathur wrote:
I don't know how to attach screenshots. I have attempted to copy/paste them into this box where I type these words, but it doesn't work. I don't see an option that allows me to attach documents.

I also don't see the link you recommended that I click on to see an example. Perhaps I need to change some settings?


By default, I don't allow to upload attachments. I was just showing you how to use code tags.
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group