|
What is and how do I create a ODBC Data Source Name (DSN)?
A Data Source Name (DSN) is used to provide a
connection to a database through a ODBC driver. The connection is an
easy way to reference all of the information needed to connect to a
database in your web application. e.g. IP address, username and
password. Depending on the database or programming language you may or
may not need to create an ODBC DSN.
Scripting Languages:
ASP/ASP.NET: Create a DSN using your Control Panel or connect to
it directly using an ASP connection string and the connection
information for the database. Please be sure to use the "internal" IP
address.
Cold Fusion: Cold Fusion DSN's can be created form the Control
Panel. However, you will need to use the Cold Fusion DSN tool instead
of the ODBC DSN tool. They are both found in the same place. A
ColdFusion DSN cannot currently be created to connect to a MySQL
database, although the option may appear.
PHP: Create a DSN using your Control Panel or connect to it
directly using an PHP connection string and the connection information
for the database. Please be sure to use the "internal" IP address.
Databases Notes:
MS Access: We recommend that you create a blank MS Access DB
using the Database Managment tool in the control panel. This will place
a blank MS Access DB in the DB folder above the WWWROOT folder in FTP.
At this point you can upload and overwrite with your own DB of the same
name or use the blank DB. We suggest this procedure so your DB is
recorded in the Control Panel in the vent of a problem.
MS SQL: When connecting to a MS SQL DB using a direct connection
(NO ODBC DSN) you will need to specify the appropriate INTERNAL IP
address in your connection string. Otherwise, add an ODBC DSN. Even
when connecting by a DSN, please be sure to include your username and
password in your connection string.
MySQL: When connecting to a MySQL DB using a direct connection
(NO ODBC DSN) you will need to specify the appropriate INTERNAL IP
address in your connection string. Otherwise, add an ODBC DSN. Even
when connecting by a DSN, please be sure to include your username and
password in your connection string.
To create a DSN using your Control Panel:
- Login to the Control Panel.
- Click on Domains >> Select the domain you want to edit.
- Click on the ODBC icon, select the DB type and specify the appropriate DB.
- Click Save.
Please note: Only databases created in your Control Panel can be used to create a DSN.
|