Hey,
I just started working at this new company and they gave me a simple
database project to start with. yet I am starting to look like an
idiot cause I can't even seem to connect to the MS Access DB with ASP.
I already went into Data Sources (ODBC) with windows Control panel and
set up a DSN. I don't think that is the problem. I am no expert at
all at asp...
can anyone see what I am doign wrong here? The name of my Data Source
is "order" and the actual database is order.mdb
If anyone can help me out or point me in the right direct I would be
very greatful!!!
Ryan Ritten
P.S. when I try and run this script froma browser, it always says
"This page cannot be displayed"
<%
'Dimension variables
Dim adoCon 'Holds the Database Connection Object
Dim rsGuestbook 'Holds the recordset for the records in the database
Dim strSQL 'Holds the SQL query to query the database
'Create an ADO connection object
Set adoCon = Server.CreateObject("ADODB.Connection")
'Set an active connection to the Connection object using DSN
connection
adoCon.Open "DSN=order"
'Create an ADO recordset object
Set rsGuestbook = Server.CreateObject("ADODB.Recordset")
'Initialise the strSQL variable with an SQL statement to query the
database
strSQL = "SELECT * from order;"
'Open the recordset with the SQL query
rsGuestbook.Open strSQL, adoCon
'Reset server objects
rsGuestbook.Close
Set rsGuestbook = Nothing
Set adoCon = Nothing
%>