다음을 통해 공유


IDataSourceLocator::PromptEdit

Opens the Data Link Properties window. Allows the user to change the properties for an existing ADO connection object. The properties for the connection object are changed directly at the connection object.

Syntax

bolStatus = objDataLink.PromptEdit(ppADOConnection As Object)

Parameters

  • ppADOConnection
    An ADO connection object. Contains preset connection properties that will be displayed in the Data Link Properties window.

Return Value

  • bolStatus
    A Boolean value. True if user pressed OK in the Data Link Properties window; False if Cancel was pressed.

Visual Basic 6.0 Example

Dim bolStatus as Boolean
Dim cnn as ADODB.Connection
Dim objDataLinks as DataLinks
Set cnn = New ADODB.Connecton
Set objDataLinks = New Datalinks
cnn.Provider="Microsoft.Jet.OLEDB.4.0"
cnn.Properties("Data Source") = "Northwind.mdb"
bolStatus = objDataLinks.PromptEdit(cnn)
If bolStatus = False Then
   MsgBox("User pressed cancel button")
End If
MsgBox(cnn.ConnectionString)
Set objDataLinks = Nothing
Set cnn = Nothing

Result message box

Results will vary according to the parameters selected.

"Provider=Microsort.Jet.OLEDB.4.0;Data Source=C:\Program Files\VB98\NWIND.MDB;Persist Security Info=False"

See Also

Reference

IDataSourceLocator