Hi I am trying open a database (MS Access) via an ASP.
It is a simple page with two options one link to enter the
site and the other that will allow the database administrator
access to the raw tables and records within. If possible I would like it to open the 'Main Menu' form in the database??
I have included the database connection script below but don't know how to incorporate a button around it, nor the SQL that is needed to open the database.
Security is not an issue regarding access to the database
this is only for personal educational use only.
not sure if this is exactly what your are looking for, but it should help you.
If you have a form with a text box for inputting the table name and then post it back to itself you can then use this code:
p_table_name = Request.form("p_table_name")
set tableSet = Server.CreateObject("ADODB.RecordSet")
tableSet.Open p_table_name, databaseName, adOpenForwardOnly, adLockOptimistic, adCmdTable
p_numberOfColums = tableSet.fields.count
<% for x = 0 to (p_numberofColums - 1 ) %>
<td> <%= tableSet.Fields(x).Name %> </td>
<% next %>
<% while not tableSet.EOF %>
<tr> <% for each col in tableSet.Fields %>
<td> <%= col.Value %> </td>
<% next %>