Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

newbe at asp looking for connection 1

Status
Not open for further replies.

rry2k

Programmer
Jun 28, 2001
678
US
I'm taking my first stab at asp with a database. When I try to run the code I get a general error on line 15 which is the connection string. I think the way I'm trying to define my path is the problem. thanks in advance for the help. here is the code:

<html>
<head>
</head>
<body>
<p>
<%
dim path
dim dbq
path = server.mappath(&quot;critters.mdb&quot;)
dbq = path
%>
<%
openstr = &quot;driver={Microsoft Access Driver (*.mdb)};&quot; & &quot;dbq&quot;
Set cn = Server.CreateObject(&quot;ADODB.Connection&quot;)
cn.Open openstr
 
hi -

this should read
openstr = &quot;driver={Microsoft Access Driver (*.mdb)};&quot; & &quot;dbq=C:\myfolder\path\tomydb.mdb&quot;

hope this helps
leo
 
Leo,

That did it thanks for the help.

Russ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top