LCJ
LCJ

Reputation: 22662

Remote host "." was not found error

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

Answers (2)

LCJ
LCJ

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

tolga güler
tolga güler

Reputation: 347

Maybe you should try to set your hostname to your local ip or "localhost".

Upvotes: 3

Related Questions