To eject the Database Connection dialog box without using COM components

Source: Internet
Author: User
Tags ole
dialog box | data | Database connection check the SQL Server Help file today, just click to 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 to requirement by providing a dialog box that enables the CL Ient application to connect to the Analysis server or a local cube.

To use this prompt, the prompt property of the connection string must is set to 1:

Dim Conn as New ADODB. Connection
Conn.Open "PROVIDER=MSOLAP; Prompt=1; " Oh, conveniently to. NET down to try, found in OLE DB can be used, OleDbConnection cn = new OleDbConnection ("Provider=SQLOLEDB.1; Prompt=1 "); pop-up
Will provider change to microsoft.jet.oledb.4.0 after, show such hehe, the other provider did not try. This method is not available under SqlConnection. This method has two bad places: 1. The pop-up dialog box is modeless; 2. Just click Cancel to throw an exception;


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.