DSN establishes a Dream 7 (DM) connection

Source: Internet
Author: User
Tags dsn

(DSN) Data Source Name

The ODBC Data Source Administrator provides three types of DSNs, User DSN, System DSN, and File DSN, respectively.
which
The user DSN saves the appropriate configuration information in the Windows registry, but only the logged-on user who created the DSN is allowed to use it.
The System DSN also saves the configuration information in the system registry, but unlike the user DSN, the System DSN allows all users who log on to the server to use it.
Unlike the above two database DSNs, file DSNs store specific configuration information in a specific file on the hard disk. The File DSN allows all users who log on to the server to use it, and provides access support for the database DSN even when no user is logged on. In addition, because file DSN is saved in the hard disk file, it can be easily copied to other machines. This allows users to use DSN created on other machines without any changes to the system registry.

In the above three kinds of database DSN, the user is recommended to select a System DSN or file DSN, if the user prefers the portability of File DSN, you can get high security by setting the access rights of files under NT system.

PS: Reach Dream 7 Database DSN connection string

Method 1: Establish a data source via ODBC such as:DM7, establishing a connection through the data source

Strdcon = ("dsn=DM7; uid= user name; pwd= password; server= database IP; tcp_port= database Port ");

Method 2: Do not establish a data source to establish a connection through driver

Strdcon = ("Driver={dm7 ODBC DRIVER}; uid= user name; pwd= password; server= database IP; tcp_port= database Port ");

Of course, there are other formulations.

Such as:

Strdcon = ("DSN=dm7; DRIVER={dm7 ODBC DRIVER}; uid= user name; pwd= password; server= database IP; tcp_port= database Port ");

When DSN and driver exist at the same time only respond to the "driver" in front, that is, when the data source ' DM7 ' is not configured, the entire connection string will not be able to establish a connection, and vice versa.

The premise is that the DM7 driver needs to be installed on the machine.

DSN establishes a Dream 7 (DM) connection

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.