<%
Dim myVariable
'''Query the DB'''
myVariable = Recordset("Columnname")
%>
Recordset = the variable containing the recordset returned from your query
Columname = the name of the column in the recordset you want to get the value of for the current row