How to display a table from SQL from ASP

How to display a table from SQL from ASP

am 03.10.2005 22:36:41 von karenmiddleol

I am looking for ASP code that accepts a table name in a SQL database
and display the contents of the the table by finding the column names
of the table in the SQL Server table.

Thanks
Karen

Re: How to display a table from SQL from ASP

am 04.10.2005 20:42:42 von unknown

set rs = yourADOObject.Execute("SELECT * FROM " & tableName)

If Not rs.EOF Then

Response.Write "

"
For Each col in rsResults.Fields
Response.Write "" & vbCrLf
Next
Response.Write ""

sTBody = rsResults.GetString(2, -1, "
" & col.Name & "
", "
")
sTBody = Left(sTBody, Len(sTBody) - Len("
"))

Response.Write "
" & sTBody

Response.Write "
"
End If


Ray at work

wrote in message
news:1128371801.743197.117370@o13g2000cwo.googlegroups.com.. .
>I am looking for ASP code that accepts a table name in a SQL database
> and display the contents of the the table by finding the column names
> of the table in the SQL Server table.
>
> Thanks
> Karen
>

Re: How to display a table from SQL from ASP

am 05.10.2005 08:12:28 von SteveB

Universal DB Viewer
http://www.asp101.com/samples/db_dsn.asp
Reads properties, tables, and table data from a database.

TableEditoR
http://www.2enetworx.com/dev/projects/tableeditor.asp

Best regards,
J. Paul Schmidt, Freelance Web and Database Developer
http://www.Bullschmidt.com
Classic ASP Design Tips, ASP Web Database Sample

<<
I am looking for ASP code that accepts a table name in a SQL database
and display the contents of the the table by finding the column names
of the table in the SQL Server table.
>>

*** Sent via Developersdex http://www.developersdex.com ***