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()

' *********************************************************************
' *** If you move or rename the database file update the path below ***
' *********************************************************************

  Dim dbPath
  dbPath = "xmlasp2k.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    ***
' *********************************************************************

' OLEDB 4 connection, no DSN - use this with any recent version of MDAC 
  GetConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath(dbPath) & ";User Id=admin;Password=;"

' OLEDB 3.51 connection, no DSN
'  GetConnectString = "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=" & Server.Mappath(dbPath) & ";User Id=admin;Password=;"

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

' 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