I am trying to connect to db2, but there is an error "system.data.oledb.oledbexception unspecified error"
and highlighted the line conn.Open() .
I want to know what are the prerequisites for the connection. Or simply my code is doing wrong???
Thank you for any help.

Dim Source As String
  Source = "Provider=IBMDADB2.DB2COPY1;Database=mydb;PROTOCOL=TCPIP;PORT=portnum;Hostname:host;"
  Source = Source & "uid=myid;Password=mypsw;"
  Dim conn As OleDbConnection                             
  conn = New OleDbConnection(Source)   
This article has been dead for over six months. Start a new discussion instead.