DSN står for Database Source Name og sættes op under dine ODBC indstillinger i Windows kontrolpanelet. ODBC er en forkortelse for Open DataBase Connectivity.
(
http://en.wikipedia.org/wiki/Database_Source_Name)Database Source Names, more commonly seen as the abbreviation, DSN, are data structures used to describe a connection to a database. This DSN will take the form of protocol: subprotocol: host: port: database so as to completely specify all parameters of the connection. The exact format of the DSN will vary depending on your programming language.
Example of use
Using a DSN to connect to a MySQL database through the Web, Web users can submit form entries to a MySQL database by establishing a connection to the MySQL database's DSN.
The advantage of a DSN is that applications can take advantage of any database, as long as DSN is supported (i.e. in Apache/PHP, IIS/ASP)
In ASP (VBScript), to open a DSN connection, the code is:
Dim DatabaseObject1
Set DatabaseObject1 = Server.CreateObject("ADODB.Connection")
DatabaseObject1.Open("DSN=DSNname;")
Indlæg senest redigeret d. 25.11.2006 14:27 af Bruger #10448