When you check the SQL Server Help file today, just click on the USING The OLE DB Connection Dialog Box page.
Using the OLE DB Connection Dialog Box
OLE DB specifies that each provider must provide a dialog box for defining connections to its data sources. Microsoft® SQL Server ™ 2000 Analysis Services complies with this requirement by providing a dialog box that enables the client application to connect to an Analysis server or a local Cube.
To Use this prompt, the prompt property of the connection String Must Be set to 1:
DIM CONN As New Adodb.connection
Conn.open "provider = msolap; prompt = 1;" Oh, try to go to .NET and try it, find it can be used under OLEDB, OLEDBCONNECTION CN = New OLEDBConnection ("provider = SQLOLDB.1; Prompt = 1"); pop-up
After the provider is changed to Microsoft.jet.Oledb.4.0, it shows such a huh, and the other providers have not tried it. This method cannot be used under SqlConnection. This method has two bad places: 1. The pop-up dialog is non-modular; 2. As long as you click Cancel, you will throw an exception;