question

paulobiloza avatar image
paulobiloza asked

Enable to connect VB.net application to remote DB2 database

Public Class Form1 Dim con As New OleDb.OleDbConnection Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Try con.ConnectionString = "Provider=DB2OLEDB;Data Source=@IP;Persist Security Info=False;Password=UserPWD;User ID=UserID;Database Name=@IP;Network Address=@IP;Package Collection=QGPL" con.Open() Catch ex As Exception MessageBox.Show("Erreur Message : " & ex.Message) MessageBox.Show("Erreur StackTrace: " & ex.StackTrace) MessageBox.Show("Erreur HelpLink: " & ex.HelpLink) MessageBox.Show("Erreur Source: " & ex.Source) MessageBox.Show("Erreur TargetSite: " & ex.TargetSite.ToString()) End Try End Sub End Class Error: The host resource could not be found. Check that the Initial Catalog value matches the host resource name.
db2vboledbvb.netdb2-provider
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.