%@ LANGUAGE="VBSCRIPT" %> <% Option Explicit ' Purpose: ' Accesses Customer Information and displays it in neat format ' '---------------------------------------------------------------------- ' All your ASP preprocessing code goes here '---------------------------------------------------------------------- ' -- Declare Variables Dim objConn ' Our Connection Object Dim objRS ' Our Recordset Object Dim strSQL ' Our SQL String to access the database Dim strConnection ' Our Connection string to access the database Dim i ' a counter variable ' -- Create objects Set objConn = Server.CreateObject("ADODB.Connection") Set objRS = Server.CreateObject("ADODB.Recordset") ' -- Connection String Value 'strConnection = "FILEDSN=Your DSN Path here\NWIND.dsn" ' -- Open the Connection objConn.Open "Data Source="& Server.Mappath("hitec.mdb") &";Provider=Microsoft.Jet.OLEDB.4.0;" ' -- Our SQL Statement strSQL = "SELECT * FROM projects" ' -- Populate our Recordset with data set objRS = objConn.Execute (strSQL) if (objRS.BOF and objRS.EOF) then response.write "No records found" response.end End if '---------------------------------------------------------------------- ' Begin HTML output '---------------------------------------------------------------------- %>
|
| ||||
|
||||