i am using Carlos J. Quintero's MZ tools 3.0 and there is a function to allow you to build an ADO connection string (see attached)
Has this form been built by Carlos or is it a control which i can referance in my app?
Printable View
i am using Carlos J. Quintero's MZ tools 3.0 and there is a function to allow you to build an ADO connection string (see attached)
Has this form been built by Carlos or is it a control which i can referance in my app?
Word has one in the MailMerge section, but I think he wrote his own.
Right click on ADODC. go to ADODC Properties. In General > Use Connection String > Build. You see the same form.
flair, i have seen this form which is why i asked if it was a control i could give the user of my app access to at runtime so they can connect the app to a different DB.
You will need to set a reference to "Microsoft OLE DB Service Component 1.0 Type library" and then you can call up the dialog like this.
VB Code:
Option Explicit Private Sub cmdConn_Click() MsgBox BuildConnectionString End Sub Private Function BuildConnectionString() As String Dim objLink As MSDASC.DataLinks Dim strConn As String On Error Resume Next ' Display the dialog Set objLink = New MSDASC.DataLinks strConn = objLink.PromptNew If Err.Number = 0 Then ' Create a Connection object on this connection string BuildConnectionString = strConn Else ' User canceled the operation BuildConnectionString = "" End If Set objLink = Nothing End Function
MarkT, cheers that is exactly what i was looking for! :bigyello: