Topic
No replies
nivas_123
nivas_123
1 Post
ACCEPTED ANSWER

Pinned topic db2 express c connection failed

‏2013-10-15T06:30:33Z |

hi,

iam using below code for connecting to the .net ,the connection is sucess,and iam encrypted this code after that iam decrypting and testing the connection.But error is coming.connection is not opening

Below error is coming Please help me on this.

Error:multiple-step oledb operation generated error check each oledb Status value if availanle-no work was done

  try
            {
                //string strcon = "Provider=SQOLEDB;Server=sp3819;uid=sa;pwd=dbp@ssword;database=rrslocal;";
                //server=172.16.17.89:50001;user id=db2inst1;password=db2inst1;database=RMSDB10;CurrentSchema=MIGUSER;persist security info=True;"
           // string strconnection = "Provider=IBMDADB2;Database=RMSDB10;HOSTNAME=172.16.17.89;PROTOCOL=TCPIP;PORT=50001;uid=db2inst1;pwd=db2inst1";
                string strconnection = "Provider=IBMDADB2;Server=localhost;user id=db2admin;pwd=Password123;database=sample; providerName=System.Data.OleDb;";
               // string strcon = TxConnStringClient.Text;
              OleDbConnection _connection = new OleDbConnection(strconnection);
                OleDbCommand _cmd = new OleDbCommand();
                _cmd.Connection = _connection;
                _connection.Open();
                MessageBox.Show("connection for local client DB is sucess ");

                _connection.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }