0

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)   
  conn.Open()
  .
  .
  .
  conn.Close()
2
Contributors
1
Reply
2
Views
4 Years
Discussion Span
Last Post by pritaeas
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.