<% set conn = Server.CreateObject("ADODB.Connection") set cmd = Server.CreateObject("ADODB.Command") ' IF SQL SERVER USE SOMETHING LIKE THIS 'Data Source = Server Name 'Initial Catalog = Database 'Use your own user name and password sConnString = "Provider=SQLOLEDB.1;User ID=sa;password=mypassword;Initial Catalog=MyDatabase;Data Source = MySQLServer;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096" 'IN ACCESS USE SOMETHING LIKE THIS: 'Change Data Source to full path of database sConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyDatabase.mdb" Conn.Open sConnString Set cmd.ActiveConnection = Conn cmd.CommandText = "SELECT * FROM MYTABLE" cmd.CommandType = adCmdText 'Creates a read-only, forward only recordset Set rs = cmd.execute Do While Not rs.EOF For iCtr = 0 To rs.fields.Count - 1 'Output name and value of each field response.write rs.fields(iCtr).Name & ": " response.write rs.fields(iCtr).Value & "
" Next rs.MoveNext Loop Set rs = Nothing Set cmd = Nothing Conn.Close set conn = nothing %>