<% noads=1 %> <%dim crumb crumb="Access DSN Database Connection" Crumb2="Data Source Name (DSN) Connection Method" crumb1="DSN Connection String Example" %> DSN Connection Database
Home  Fees/Services  Access Examples  Programming Tutorials  Access Download  Articles  Search  Contact  Privacy  Links
  <%if len(crumb2)>2 then response.write crumb2 %>
 <% response.write crumb1 %>
 Home > MS Access Tutorials > Connection Strings<% response.write " > " & crumb %>

<% dim Gnum,Ynum Gnum="0957644070" Ynum="7867" dim Page_Type Page_Type="Prog" %>






Connect String to Access DSN

Connect String to OLEDB Provider for Jet

Database Connect String to Remote Database

ADO File-DSN Database Connection String

Access DSN-Less Connection String

SQL/Server ODBC Database Connection Method Example

OLE DB UDL Database Connection String Example

Connection Open Method String Example

Microsoft Office:
  MS Access 2003
  Access 2007
  Access 2010
  Access 2013


DSN Connection Method for ASP

Internet to database DSN connection string is shown in the example below.  DSN connections can be used with a Microsoft Access databases and other ODBC compliant databases.

Dim conn as DB.Connection
Dim rst as DB.Recordset
Dim sql as string

'---------------

Set conn = Server.CreateObject(" DB.Connection")
conn.open "DSN=your_DSN","UID=username","Pwd=password;"

Where: your_dsn = the DSN you have setup using ODBC database connection in your control panel, or a DSN setup by the remote hosting company who hosts your website, or your in house network support group.

username = the username you have identified in the database, or the default 'Admin' username.

password = the password you have setup in the database or "Pwd=;" for no password.

'--------------  here we use the connection

sql = "select sales_rep, dollars from sales_by_rep_chart"

Set rst = Server.CreateObject(" DB.Recordset")
rst.Open sql, conn, 3, 3
Set Session("mysession") = rst
rst.movefirst
response.write rst!sales_rep

'--------------

Where mysession is any name for the session.

When done with the recordset don't forget to close it:

Conn.close
set conn=nothing



















Contact Information

<% Response.write "Copyright 2000-" & year(now) & " Blue Claw Database Design" %>