Home  Fees/Services  Access Examples  Programming Tutorials  Access Download  Articles  Search  Contact  Privacy  Links
  DSN-Less Connection String
 DSN Less Database Connection Example







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-less Connection String Code

DSN less Connection Method Example

DSN less database connection string example is shown in the first example below and can be used with Microsoft Access databases and others.  DSN less method is considered to be faster than the DSN method.

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

Without workgroup security, .mdw system file:
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};" & _



Our programming team has 15 members containing a wide variety of technical database knowledge and programming experience. Experts in small business management and scientific database programming.

Did you know you don't need to move to SQL/Server to run and manage your Access database on the net. There are many alternative solutions. Among them are Amazon's AWS cloud services and various hosting services in nearly every state.


                   "DBQ=path_to_database;" & _
                   "PWD=password;"

With workgroup security:
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};" & _
                   "DBQ=path_to_database;" & _
                   "SystemDB=path_to_system_database;" & _
                   "PWD=password;"

Where:
path_to_database = The database path, such as F:\mydatabases\orders.mdb

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

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

path_to_system_database the path to where the system MDW file exits, such as X:\mydatabasestuff\system.mdw

'--------------  here we use the dsn-less 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

You may also disconnect from the DSN-less database connections session by issuing:

session.abandom









A Blue Claw Database Design Article:

ODBC Links To Other DB Systems
 





Blue Claw Database Design Downloadable Tutorial:
Use Global Variables as Parameters  





A Blue Claw Software Design Template:

Farmer's Feed Inventory Tracking Database
 




Contact Information

Copyright 2000-2017 Blue Claw Database Design