(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