Home
dbPix
Download
Order
Testimonials
Support
Tutorials
Samples
KnowledgeBase
Links
Revision History
Documentation
Search
Contact
Site Map

Graph: dbPix image storage vs OLE Embedding and Linking in Microsoft Access


DBPix Sample Source Code: config.inc
Back to sample
<%
FUNCTION GetConnectString()
  Dim dbPath
' *********************************************************************
' *** If you move or rename the database file update the path below ***
' *********************************************************************

  dbPath = "photos.mdb"

' *********************************************************************
' *** Un-comment ONE of the following connection strings.           ***
' *** If using the ODBC DSN connection you will also have to        ***
' *** create a system DSN in 'Data Sources' in the control panel    ***
' *********************************************************************

' 1st choice OLEDB 4 connection, no DSN - may not work unless you have a recent version of MDAC 
  GetConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath(dbPath) & ";User Id=admin;Password=;"

'  2nd choice OLEDB 3.51 connection, no DSN - may not work unless you have a (less) recent version of MDAC 
'  GetConnectString = "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=" & Server.Mappath(dbPath) & ";User Id=admin;Password=;"

'  3rd choice ODBC DSN-Less connection - Should work on most systems
'  GetConnectString = "Driver={Microsoft Access Driver (*.mdb)};Dbq=" & Server.Mappath(dbPath) &";Uid=Admin;Pwd=;"

'  4th choice ODBC DSN connection - You must set-up a system DSN to use this
'  GetConnectString = "uid=sa;pwd=sa;dsn=Pics;"

END FUNCTION
%>

Back to sample