question

Campono-7194 avatar image
0 Votes"
Campono-7194 asked TimonYang-MSFT edited

Visual studio 2019 DB2 Connection -- Attempt to connect to the database server failed because of a licensing problem

Hi,
Introduction
I am working on a Visual Studio 2019 Windows 10 C# app.
Right now, I create a DB2 connection string and attempt to connect to this database:
97557-devenv-x2hu9o1iyr.png
As you can see from this image, I can connect to this database using Microsoft Visual Studio's Server Explorer feature.

This is my code:
97578-devenv-euklv9gknm.png

Problem
However, when I run my code, I receive this error:
97641-devenv-eortl0elcb.png
a licensing problem.

(I have tested for and know my connection string is correct: )
97632-devenv-4t4hzgftnk.png

What I have tried
I have done lots of troubleshooting on this licensing issue, some posts (https://www.ibm.com/support/pages/sql1598n-error-connecting-mainframe-db2-ibm-data-server-driver-even-though-db2-connect-license-file-exists-license-directory-install-path) suggest there is a mismatch in my license file version and the version of my DB. I am pretty sure both are version 11.1:
97623-cmd-b9jgulcvuw.png
97558-cmd-nzqvvyreav.png

Just recently (in the last hour) I tried installing this fix: https://www.ibm.com/support/pages/ibm-data-server-client-packages-version-111-mod-4-fix-pack-4 but I still receive the same error.

Questions
Why can I connect to this DB2 on Microsoft Access and Visual Studio's Server Explorer, but not within my app?
(IBM related question: Where do I find my license file to check if there is a mismatch?)

I would appreciate any form of help.


not-supported
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

You are posting about DB2 database issues. You should be able to find a DB2 forum using Bing or Google for .NET usage.

1 Vote 1 ·

0 Answers