I now see a new class of error. Are there additonal parameters I should
use in my Connection String? I am still not sure what a Database
is...MARDRPALL is a File in the $HAWLIB. Should I use the Library name?
Using the connection string:
try {
string myConnString =
"Database=MARDR PALL;Server=192 .168.1.43;UID=J BAILO;PWD=TOOTH PICK1;";
DB2Connection myConnection =
new DB2Connection(m yConnString);
myConnection.Op en();
} catch (Exception e) {Debug.WriteLin e(e.ToString()) ;}
The error is:
IBM.Data.DB2.DB 2Exception: ERROR [HY009] [IBM] CLI0124E Invalid
argument value. SQLSTATE=HY009
at IBM.Data.DB2.d. a(String A_0, Int32 A_1, IsolationLevel A_2,
DB2Connection A_3)
at IBM.Data.DB2.DB 2ConnPool.a(DB2 Connection A_0, String A_1, a& A_2,
Object& A_3)
at IBM.Data.DB2.DB 2Connection.Ope n()
at dot400.Form1.pr ocessSqlRequest (String qs, Int32 q) in
c:\documents and settings\jbailo \my documents\visua l studio
projects\dot400 \form1.cs:line 205
If I use Database=Sample , or Database=$HAWLI B, the error is:
IBM.Data.DB2.DB 2Exception: ERROR [08001] [IBM] SQL30081N A
communication error has been detected. Communication protocol being
used: "TCP/IP". Communication API being used: "SOCKETS". Location
where the error was detected: "192.168.1. 43". Communication function
detecting the error: "connect". Protocol specific error code(s):
"10061", "*", "*". SQLSTATE=08001
at IBM.Data.DB2.d. a(String A_0, Int32 A_1, IsolationLevel A_2,
DB2Connection A_3)
at IBM.Data.DB2.DB 2ConnPool.a(DB2 Connection A_0, String A_1, a& A_2,
Object& A_3)
at IBM.Data.DB2.DB 2Connection.Ope n()
at dot400.Form1.pr ocessSqlRequest (String qs, Int32 q) in
c:\documents and settings\jbailo \my documents\visua l studio
projects\dot400 \form1.cs:line 205
So it seems like MARDRPALL is a database...
Frans Bouma [C# MVP] wrote:
C.E.O. Gargantua wrote:
I am using the IBM DB2 Connector class of the Redistributable DB2
Run-Time Client Lite in a c# .net application using Visual Studio.
Running the code:
string myConnString = "DATABASE=192.1 68.1.43;UID=XXX X;PWD=XXXX";
this isn't correct.
Use something like:
"Database=SAMPL E;Server=192.16 8.1.43;UID=XXXX ;PWD=YYYY;"
or with portnumber:
"Database=SAMPL E;Server=192.16 8.1.43:1533;UID =XXXX;PWD=YYYY; "
At least that's how I construct the connection strings, which do
work. I had similar issues like the ones you describe. Also if usernames
apparently don't match you get this kind of error.
Frans.
--
incognito...upd ated almost daily
http://kentpsychedelic.blogspot.com
Texeme Textcasting Technology
http://texeme.com