× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



To give closure to this,

I got some help from someone offline (I didn't ask if they want credit for
the assist so I'm leaving them anonymous) on the connection string. It
appears that the string that I got from the internet is incorrect or
outdated or something that makes it fail. My corrected string that does
work is:

"DataSource=192.168.1.91;Database=MIDOHIO;userid=JSMITH;password=myPassword;
"

The only keyword that appears to have been correct is Database. :(

I am still using IBM.Data.DB2.iSeries.dll.

-----Original Message-----
From: smith5646midrange@xxxxxxxxx <smith5646midrange@xxxxxxxxx>
Sent: Wednesday, March 27, 2024 4:53 PM
To: 'Midrange Systems Technical Discussion' <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: Writing a PC program with SQL connectivity

Thanks Bryan. That kind of helped. I found IBM.Data.DB2.iSeries.dll. It
appears to have IBM.Data.DB2 inside of it.

Every sample program that I can find references DB2Connection. It appears
that IBM.Data.DB2 has iDB2Connection not DB2Connection.

I have tried to use it but I get an error that my connection string is
invalid. Here is my connection string.

string myConnString = "Server=192.168.1.91; Database=MIDOHIO;
UID=JSMITH; PWD=myPassword;";

If I do STRSQL it responds "Current connection is to relational database
MIDOHIO." so I am assuming that MIDOHIO is the "Database" in the string.

Do you see what is wrong with this?



-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Bryan
Dietz
Sent: Wednesday, March 27, 2024 3:54 PM
To: midrange-l@xxxxxxxxxxxxxxxxxx
Subject: Re: Writing a PC program with SQL connectivity

do you have the windows portion of ACS installed?
That is where those DLL's exist.

or you could use jt400.jar for ODBC sonnection I see this is the one to
download from ACS download page:
IBMiAccess_v1r1_WindowsAP_English.zip

Bryan


smith5646midrange@xxxxxxxxx wrote on 3/27/2024 1:45 PM:
I'm not sure this is the right list for this. If not, let me know
which one is and I will repost it.

I have been asked to write a PC .exe program that will execute an SQL
statement on the IBM i and then exit with an appropriate return code
based on what it found. I know how to do all of this in C#.NET except
I can't seem to find what I need for the SQL connection piece.

I assumed that I needed a .dll installed and added into my program
like I need to do for MySQL connections. I found info saying that I
needed IBM.Data.DB2.dll. I googled it to search for a download site
and found
https://www.ibm.com/support/pages/download-initial-version-115-clients
-and-d rivers. I downloaded IBM Data Server Driver Package (DS
Driver). However, it looks like it is going to install DB2 on my
laptop not just the .dll that I was looking for.

Can someone help point me in the right direction for this?



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.