Mhtml
07-31-2002, 09:54 AM
Ok, I've been to http://www.4guysfromrolla.com and I followed the instructions there for learning how to do a dsn-less connection to a access db. But I didn't get it to work. here's the script:
<%
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "DBQ=C:\inetpub\wwwroot\cube\db\main.mdb;DRIVER={MS Access (*.mdb)}"
objConn.Open
%>
Followed by the html tags.
Also once I have got my db open how do I get & send information?
glenngv
07-31-2002, 10:12 AM
objConn.ConnectionString = "DBQ="&server.mappath("db/main.mdb") & ";DRIVER={MS Access (*.mdb)}"
Originally posted by Mhtml
Ok, I've been to http://www.4guysfromrolla.com and I followed the instructions there for learning how to do a dsn-less connection to a access db. But I didn't get it to work. here's the script:
<%
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "DBQ=C:\inetpub\wwwroot\cube\db\main.mdb;DRIVER={MS Access (*.mdb)}"
objConn.Open
%>
Followed by the html tags.
Also once I have got my db open how do I get & send information?
Mhtml
07-31-2002, 10:40 AM
ok, I got this error. I'm not quite sure what I'm doing but I believe that I need to acces jet or something, my version is Microsoft.Jet.OLEDB.4.0
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/db.asp, line 5
:confused:
glenngv
07-31-2002, 10:48 AM
try:
objConn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("db/main.mdb") & ";"
Originally posted by Mhtml
ok, I got this error. I'm not quite sure what I'm doing but I believe that I need to acces jet or something, my version is Microsoft.Jet.OLEDB.4.0
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/db.asp, line 5
:confused:
Mhtml
07-31-2002, 11:00 AM
Success! Thanks Glenn, :thumbsup: