DSNLess troubles

S

shank

I'm trying to setup an Access DSNLess connection on my local computer. The
following string works fine within the Dreamweaver interface. But when I
upload to my server (locally) I get this error. Can anyone lend some
insight?
thanks

Object required: 'oConn'
/Connections/conn.asp, line 2

<%
oConn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
"Dbq=c:\inetpub\wwwroot\authors.mdb;" & _
"Uid=admin;" & _
"Pwd="
%>
 
D

dlbjr

Set Conn = CreateObject("ADODB.Connection")
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=c:\inetpub\wwwroot\authors.mdb; " & _
"Jet OLEDB:Database;"

Use OLE Exclusive for speed.
Place the connection string in the global.asa file.

Application("ConnString") = "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=c:\inetpub\wwwroot\authors.mdb; " & _
"Jet OLEDB:Database;"

Then use it on any page as so:

Set Conn = CreateObject("ADODB.Connection")
Conn.Open Application("ConnString")

This will allow you to edit the connection string at any time and effect all connections.
 

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,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top