Home · Standard Web Hosting · Dedicated Web Hosting · Managed Name Servers · E-Mail Services
 
Home
/ Browse Categories / SmartWeb / Windows Services / Connecting to a Database Without a DSN
Connecting to a Database Without a DSN

To connect to a database without using a DSN, please see the following code samples.

DSNless Connection for MS Access

mdbfile = "/stuff/sample.mdb"
connstr = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath( mdbfile ) & ";"

DSNless connection for MS SQL

"DRIVER={SQL Server};SERVER=sql-01.web.parafx.com;DATABASE= databasename _domain_com;UID=dbm_domain_com;PWD=password;"

DSNless connection for MySQL

Driver={MySQL};Server=mysql.parafx.com;DATABASE=databasename;UID=username;PWD=password;



User Comments
Connecting to a Database Without a DSN
Add Comment
There are no user comments for this topic.
Add Comment
Additional Info
General Information
Article No. 72
Created: 01:37 AM 04.16.04
Author: Support

Attachments
No attachments.

Did this help you?
Yes No

Statistics
Yes625 (46%) Voted Yes756 (54%) Voted NoNo

Other Options
Print Article
Email Article

Related Articles
What COM Objects / Components do you support?
Create a DSN for an MS Access Database
Create a DSN for a MS SQL server
Create a DSN for a MySQL Database
Connecting to a database with a DSN

Copyright 2013 myonlinehostingsupport.com