Home   |   Windows   |   Linux   |   Reseller   |   Support   |   1-866-MavwebNet Toll Free   

 Web Hosting
 Place Order
 Linux Shared
 Windows Shared
 Reseller Hosting
      Dual Platform

 Windows Unlimited
      Domains

 Linux Unlimited
      Domains

 Control Panel Demo
 Hsphere Features
 Dedicated Hosting
 Support Center
 General Info
 FAQs
 Technical Info
 Frontpage Resources 
 Interdev Resources
 Downloads
 Link to Us
 Terms of Service

 Web Design
 General Information
 Contact Us

 Features
 SQL
 Email
 Stats

 Components
 ASPDNS
 ASPHTTP
 ASPImage
 ASPMail
 ASPPop3
 ASPTear
 Browser Hawk
 SA-Fileup
 SA-Archive

 Resources
 ASP
 DSN-Less Wizard
 HTML
 JavaScript
 MouseOver Wizard
 NewsGroups
 Style
 Web Color Chart

 Search Mavweb
  
   All Words
   Any Word  
  Join Our Mailing List!
  
  


Sample Database Connection Strings

If you are planning on making a database call from the web the first thing you will need to do is plan on making a "Database Connection". Here are some sample database connection strings to help you get started.


OLE DB Method for SQL
<%
set cnn = server.createobject("ADODB.Connection")
cnn.open "PROVIDER=SQLOLEDB;DATA SOURCE=sqlservername;UID=username;PWD=password;DATABASE=databasename "
%>

DSN Less connection for Access
<%
set cnn = server.createobject("ADODB.Connection")
cnn.open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\anydatabase.mdb"
%>

OLE DB Method for Access
<%
set cnn = server.createobject("ADODB.Connection")
cnn.open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=c:\anydatabase.mdb"
%>

File DSN Connection Method for Access
<% set cnn = server.createobject("ADODB.Connection")
cnn.open "FILEDSN=AccessDSN"
%>

Build your own DSN-less connection string with our wizard.
Access String Builder

What Drive is your database on?:
What is the path? EXAMPLE /databases/mydirectory/
What is the name of your database? EXAMPLE mydatabase.mdb


Copyright 1999 MavWeb. All Rights Reserved