Reputation: 22662
I am getting following error while trying to connect to DB2 database.
SQL1336N The remote host "." was not found. SQLSTATE=08001
The DB2 Express is installed in my local machine and using command window I created some tables in the database.
What should be the hostname to overcome this error?
CODE
string connectionString= @"Provider = IBMDADB2; Database = MYDATABASE; Hostname = .; Protocol = TCPIP; Port = 50000; Uid = xxx123; Pwd = dddd@454";
OleDbConnection myConnection = new OleDbConnection();
myConnection.ConnectionString = connectionString;
myConnection.Open();
Upvotes: 3
Views: 5329
Reputation: 22662
Connection String
"Provider = IBMDADB2; Database = TIMS; Hostname = localhost; Protocol = TCPIP; Port = 50010; Uid = myUserID; Pwd = myPassword";
Refer No start database manager command was issued error also
Upvotes: 0
Reputation: 347
Maybe you should try to set your hostname to your local ip or "localhost".
Upvotes: 3