dhathsato
asked on
DataGridView and DSN connection
I have received a user defined connection string from a MSDASC datalink. Now I need to have this connection string open the data in a data grid. Could I please get some help on this, I am a little lost. It is a windows form. Thank you,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Private Sub DataSourceToolStripMenuIte
Dim mydlg As New MSDASC.DataLinks()
Dim ADOcon As New ADODB.Connection()
ADOcon = mydlg.PromptNew
Try
ADOcon.Open()
If ADOcon.State = 1 Then
'connection string returned from dialog box
MsgBox(ADOcon.ConnectionSt
Else
MsgBox("Connection Failed")
End If
Catch ex As Exception
End Try
End Sub