1,105,391 Community Members

Connecting to DB2 databse

Member Avatar
lkkkeith
Newbie Poster
4 posts since Nov 2007
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
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()
Member Avatar
pritaeas
mod_pritaeas
11,316 posts since Jul 2006
Reputation Points: 1,420 [?]
Q&As Helped to Solve: 1,835 [?]
Skill Endorsements: 156 [?]
Moderator
Featured
Sponsor
 
0
 

Could be a security issue, see here:

http://forums.asp.net/t/1483203.aspx/1

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article