<%@ 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.ACE.OLEDB.12.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 '---------------------------------------------------------------------- %>
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<% ' -- Output the Field Names as the first row in the table Response.Write "" For i = 0 to objRS.Fields.Count - 1 Response.Write "" Next Response.write "" ' -- Now output the contents of the Recordset objRS.MoveFirst Do While Not objRS.EOF ' -- output the contents Response.Write "" For i = 0 to objRS.Fields.Count - 1 Response.Write "" Next Response.write "" ' -- move to the next record objRS.MoveNext Loop objRS.Close set objRS = Nothing objConn.Close set objConn = Nothing %>
" & objRS.Fields(i).Name & "
" & objRS.Fields(i) & "


Copyright - Privacy - Site:Home  Services  Projects  Products  Contact Us