Hi
I have created a page which lists the tables in a database but hides the system tables.
The table names in the list are links which pass the table name to the page 'details.asp' with the following code:
<a href="details.asp?Table=<% = RS("TABLE_NAME"
%>"><% = RS("TABLE_NAME"
%></a>
I want details.asp to list the fields in the table passed to it by the URL. Can anyone tell me what code I need to achieve that?
I'm tearing my hair out!
Many thanks.
Gerard
The full code of my page is below:
<%@Language=VBScript %>
<!-- #include file="adovbs.inc"-->
<% Set conn = server.CreateObject("ADODB.Connection"
connectstring = "Driver={Microsoft Access Driver (*.mdb)};" &_
"DBQ=" & Server.MapPath("config/datasources/schooldoccategories.mdb"
conn.Open connectString
Set Rs = Conn.OpenSchema (adSchemaTables)
Do While Not Rs.EOF
Dim Hidesysfiles
Hidesysfiles = Rs ("TABLE_NAME"
IF Hidesysfiles ="MSysAccessObjects" THEN
Response.Write ""
ELSEIF Hidesysfiles = "MSysAccessXML" THEN
Response.Write ""
ELSEIF Hidesysfiles = "MSysACEs" THEN
Response.Write ""
ELSEIF Hidesysfiles = "MSysObjects" THEN
Response.Write ""
ELSEIF Hidesysfiles = "MSysQueries" THEN
Response.Write ""
ELSEIF Hidesysfiles = "MSysRelationships" THEN
Response.Write ""
ELSE %><a href="details.asp?Table=<% = RS("TABLE_NAME"
%>"><% = RS("TABLE_NAME"
%></a>
<% End If
Rs.MoveNext
Loop
%>
I have created a page which lists the tables in a database but hides the system tables.
The table names in the list are links which pass the table name to the page 'details.asp' with the following code:
<a href="details.asp?Table=<% = RS("TABLE_NAME"
I want details.asp to list the fields in the table passed to it by the URL. Can anyone tell me what code I need to achieve that?
I'm tearing my hair out!
Many thanks.
Gerard
The full code of my page is below:
<%@Language=VBScript %>
<!-- #include file="adovbs.inc"-->
<% Set conn = server.CreateObject("ADODB.Connection"
connectstring = "Driver={Microsoft Access Driver (*.mdb)};" &_
"DBQ=" & Server.MapPath("config/datasources/schooldoccategories.mdb"
conn.Open connectString
Set Rs = Conn.OpenSchema (adSchemaTables)
Do While Not Rs.EOF
Dim Hidesysfiles
Hidesysfiles = Rs ("TABLE_NAME"
IF Hidesysfiles ="MSysAccessObjects" THEN
Response.Write ""
ELSEIF Hidesysfiles = "MSysAccessXML" THEN
Response.Write ""
ELSEIF Hidesysfiles = "MSysACEs" THEN
Response.Write ""
ELSEIF Hidesysfiles = "MSysObjects" THEN
Response.Write ""
ELSEIF Hidesysfiles = "MSysQueries" THEN
Response.Write ""
ELSEIF Hidesysfiles = "MSysRelationships" THEN
Response.Write ""
ELSE %><a href="details.asp?Table=<% = RS("TABLE_NAME"
<% End If
Rs.MoveNext
Loop
%>