<% Dim Filename Filename = Now Filename = Replace(Filename, " ", "_") Filename = Replace(Filename, "/", "-") Filename = Replace(Filename, ":", ".") origfilename = Filename ' ' The script expects c:\dblog\ to exist and be writable by the webserver process ' Filename = "C:\dblog\" & Filename & ".html" 'oTextFile.write Filename set oFs = server.createobject("Scripting.FileSystemObject") set oTextFile = oFs.OpenTextFile(FileName, 2, True) 'oTextFile.Write Contents ' oTextFile.write "

" oTextFile.write "Please remember, this script doesn't do any locking. Tables may not all be from an identical era." oTextFile.write "

" oTextFile.write Now oTextFile.write "

" Sub DrawTable(sql) Dim cnSam Dim rsRecordSet Dim rsZones Dim strsql dim i set rsZones = Server.CreateObject("ADODB.Recordset") set rsRecordSet = Server.CreateObject("ADODB.Recordset") Set cnSam = Server.CreateObject("ADODB.Connection") with cnSam .ConnectionString = "DSN=PUT_DATABASE_NAME_HERE;User ID=PUT_USERNAME_HERE;pwd=PUT_DBPASSWORD_HERE" .Open End With strsql = sql rsRecordSet.Open strsql, cnsam, adOpenForwardOnly oTextFile.write "

Dumping Data for " oTextFile.write sql oTextFile.write "

" if (rsRecordSet.BOF and rsRecordSet.EOF) then oTextFile.write "

No records found

" else oTextFile.write "" oTextFile.write "" For i = 0 to rsRecordSet.Fields.Count - 1 oTextFile.write "" Next oTextFile.write "" rsRecordSet.MoveFirst Do While Not rsRecordSet.EOF ' -- output the contents oTextFile.write "" For i = 0 to rsRecordSet.Fields.Count - 1 oTextFile.write "" Next oTextFile.write "" ' -- move to the next record rsRecordSet.MoveNext Loop oTextFile.write "
" & rsRecordSet.Fields(i).Name & "
" & rsRecordSet.Fields(i) & "
" end if rsRecordSet.close end sub ' ' Invoke DrawTable over and over with all the select queries that you want to run... ' DrawTable("select * from SOME_TABLE_NAME") DrawTable("select * from SOME_OTHER_NAME") DrawTable("select * from ETC_ETC_ETC") DrawTable("select count(*) as USE_YOUR_IMAGINATION from SOME_TABLE") oTextFile.write "

" oTextFile.write Now oTextFile.write "

" oTextFile.Close set oTextFile = nothing set oFS = nothing %>

Thank You! The database snapshot has been made.

Please fill out the following. When you have finished, please click "Finish".

What is your name?


What location are you reporting a problem for?


Which pcs are having the problem?


What is the problem you are experiencing?


(If applicable) What were you trying to do at the time of the problem?


(If applicable) What were you expecting to happen at the time of the problem?