Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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();
like image 764
LCJ Avatar asked Mar 08 '26 02:03

LCJ


1 Answers

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

like image 198
tolga güler Avatar answered Mar 10 '26 14:03

tolga güler



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!