Feb 3rd, 2005, 06:46 AM
#1
Thread Starter
Addicted Member
ADO connection string form [RESOLVED]
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?
Attached Images
Last edited by mik706; Feb 3rd, 2005 at 08:25 AM .
Mik706
Feb 3rd, 2005, 06:58 AM
#2
Re: ADO connection string form
Word has one in the MailMerge section, but I think he wrote his own.
Feb 3rd, 2005, 07:00 AM
#3
Addicted Member
Re: ADO connection string form
Right click on ADODC. go to ADODC Properties. In General > Use Connection String > Build. You see the same form.
Feb 3rd, 2005, 07:06 AM
#4
Thread Starter
Addicted Member
Re: ADO connection string 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.
Feb 3rd, 2005, 08:18 AM
#5
Re: ADO connection string form
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
Feb 3rd, 2005, 08:24 AM
#6
Thread Starter
Addicted Member
Re: ADO connection string form
MarkT, cheers that is exactly what i was looking for!
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width