by Manish Kataria (3 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 27th December 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)
open data link property window dialog, oledb connection dialog
API Declarations
microsoft ole db service component 1.0 type library
drag 2 command buttons
Private Sub Command1_Click()
Dim MSDASCObj As MSDASC.DataLinks
Set MSDASCObj = New MSDASC.DataLinks
Set cn = New ADODB.Connection
MSDASCObj.PromptEdit cn
MsgBox cn.ConnectionString
cn.Open
MsgBox "Connection opened successfully"
cn.Close
End Sub
Private Sub Command2_Click()
Dim conn As New ADODB.Connection
Dim dl As New MSDASC.DataLinks
conn = dl.PromptNew
Debug.Print conn.ConnectionString
End Sub