ASP : Recordset
Make a Recordset from scratch
set conn = Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/webdata/northwind.mdb"
set rsData=Server.CreateObject("ADODB.recordset")
rsData.Open "Select * from Customers", conn
Get the SQL out of a Recordset
rsData.source // returns the SQL used to make that record