Methods for calling the Data Link Properties dialog box

Source: Internet
Author: User

If you need to customize a dialog box that allows you to set data link properties, consider using the system's own Data Link Properties dialog box first.

The invocation is simple, with the introduction of Adodb.dll and Oledb32.dll in the project, which is a. NET library, and the latter is a COM library (Microsoft OLE DB Service Component 1.0 Type Library). Use the following code again:

ADODB. Connection adodbconnection = new ADODB. Connection ();   
Object connection = (object) adodbconnection;   
            
MSDASC. DataLinks dlg = new MSDASC. DataLinks ();   
Dlg. Promptedit (ref connection);

The system's own Data Link Properties dialog box can be opened. Common data Link properties can be set here, and finally by the incoming "connection" parameter, "Adodbconnection", you can get the desired connectionstring properties and use them in subsequent programs.

This column more highlights: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/net/

Related Article

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.