Classic ASP DatabasesDiscuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
I'm getting the following error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Error occurs on line 9
Here's my code:
<%@language="javascript"%>
<html>
<head>
<%
strcnn="Provider=Microsoft.Jet.OLEDB.4.0;Data source="+Server.Mappath("ASP_CSDL_1.mdb");
Cnn=Server.CreateObject("ADODB.Connection");
Cnn.ConnectionString="strcnn";
Rs=Server.CreateObject("ADODB.Recordset");
Cnn.Open();
%>
...
Please help me!!!
I think is like this ,but don't know correct or not :
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source= C:\datastores\classified.mdb"