IIS 5 & IIS 6
How to output the whole table from sql server
Last post May 17, 2017 06:15 AM by Yuk Ding
May 16, 2017 02:02 PM|JeffryRock|LINK
Thanks for your help about the authentication. Now, I would like to display the whole table in database but I don't know how to achieve this while the classic asp seems doesn't have something like greed view in asp.net. So is there anyone could help me achieve
this? Thanks in advance.
May 17, 2017 06:15 AM|Yuk Ding|LINK
Here is the sample to display the column with header in classic asp.
set rs = Server.CreateObject("ADODB.recordset")
rs.Open sql, conn
<table border="1" width="100%">
<%for each x in rs.Fields
response.write("<th>" & x.name & "</th>")
<%do until rs.EOF%>
<%for each x in rs.Fields%>
If you need to display the whole field, you could define multiple column. I'm afraid there is no kind of greedview in classic asp.
Note: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you.
Microsoft does not control these sites and has not tested any software or information found on these sites;
Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.
There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.