Thursday, September 17, 2009

display all fields from one database record

Here is a quick way, when debugging, to display all fields from one record
(courtesy of Bill W from 4GuysfromRolla)

strSQL = "SELECT * FROM requests WHERE ID = " & rID & ";"
Set RS = yourAlreadyOpenConnectionObject.Execute( strSQL )
For fnum = 0 TO RS.Fields.Count-1
Set fld = RS.Fields(fnum)
Response.Write fld.name & "=" & fld.value & "(begin tag)br/(end tag)" & vbNewLine
Next

No comments:

Post a Comment