<% @Language = "VBScript" %> <% Option Explicit Response.Buffer = True '---------------------------------------------------------------------------------------- '- ASP dbList - Version 8.1 - 30 July 2005 '- Copyright © 2005 - Livio Siri (http://www.livio.net) - All Rights Reserved. '---------------------------------------------------------------------------------------- Response.ContentType = "application/vnd.ms-excel" Response.AddHeader "Content-Disposition", "attachment;filename=dblist.xls" %> <% Dim Connection, dsn dsn = request.querystring("objConn") Set Connection = Server.CreateObject("ADODB.Connection") Connection.Open dsn Dim RS, SQL2, totalfields, item, arrAllData, totalrecs, rowcount, colcount, strSQL, excludedItem(), itemCnt strSQL = Request.Querystring("strSQL") Set RS = Server.CreateObject("ADODB.Recordset") RS.Open strSQL, Connection, 3, 3 totalfields = rs.fields.count response.write "
" response.write "Created: " & Date & " " & Time response.write "
" response.write "" itemCnt = 0 For each item in rs.fields response.write "" Redim Preserve excludedItem(itemCnt) if IsExcluded(item.type) then excludedItem(itemCnt) = true else excludedItem(itemCnt) = false end if itemCnt = itemCnt + 1 Next If not RS.eof then arrAllData = RS.getrows totalrecs = RS.recordcount End If response.write "" If totalrecs = 0 then response.write "" Else For rowcount = 0 to totalrecs - 1 response.write "" For colcount = 0 to totalfields - 1 if excludedItem(colcount) then response.write "" Else response.write "" End if Next response.write "" Next End If response.write "
" & item.name & "
No data was returned
Unknown" & arrAllData(colcount, rowcount) & "
" RS.Close Set RS = Nothing Connection.Close Set Connection = Nothing %>