Database connection String Methods

Source: Internet
Author: User

Connecting a database generally takes a string connection. The method of obtaining this string uses "secret cannot be said", that is, any new TXT file, renamed to. X.udl. Then double-click the file, and the Database Connection Properties window appears. The first tab "provider" lists all database engines, Access, SQL Server, Oracle, etc., select the next step to jump to the second tab "Connection", select the Server Name field can fill in the server's IP address, the machine will not fill or fill in the dot number You can select a database by filling in the database user name and password. Click the "Test Connection" button to succeed. Are you sure. Open x.udl with Notepad. You will see the connection string it generates. As follows:

"Provider=SQLOLEDB.1; Persist Security Info=false; User Id=sa; Password=123;initial Catalog=cfdata "

In this connection string, the Persist Security info property is true to indicate that the password is still saved after the connection is established and generally false. The ID and Password properties will only be available if you check "Allow Save password" in the Database Properties dialog box above. You can add them manually. Cfdata is the name of my database.

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.