ASP Beginner Connecting to an Access Database

S

Shaun

Hi,

I have recently been given an ASP site to administer, however I cannot get
the site to connect to the access the Access database.

This is the current connection file:

<%
' FileName="Connection_ado_conn_string.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="true"
' Catalog=""
' Schema=""
'Dim MM_conn***_STRING
'MM_conn***_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=***"
'MM_conn***_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=***"
Dim MM_conn***_STRING
MM_conn***_STRING = "dsn=***;"
%>

How can I modify this file such that it connects to the database in the same
directory as the file?

Thanks for your help
 
M

Martin CLAVREUIL

hi,

sorry but i don't realy understand the code you post. Usualy, to connect to
a database with an ODBC system connection we use this kind of code :
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Open "MyODBCLabel"
%>and this kind to connect with the file name :

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "d:\MyDB.mdb "
%>
 
B

Bob Lehmann

MM_maybe you stop using DreamWeaver and pick up a book on ASP. It MM_might
help.


Bob Lehmann
 
J

Jeff Cochran

Hi,

I have recently been given an ASP site to administer, however I cannot get
the site to connect to the access the Access database.

This is the current connection file:

<%
' FileName="Connection_ado_conn_string.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="true"
' Catalog=""
' Schema=""
'Dim MM_conn***_STRING
'MM_conn***_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=***"
'MM_conn***_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=***"
Dim MM_conn***_STRING
MM_conn***_STRING = "dsn=***;"
%>

How can I modify this file such that it connects to the database in the same
directory as the file?

You'll want to ask in a Macromedia/Dreamweaver group, since that's
what produced the code. If you want an ADO connection string you can
use in ASP, check:

http://www.able-consulting.com/ADO_Conn.htm

Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top