ASP - Example Code II (contd.)
<% ‘print the member variables depending on the attribute
Sub printData(ByVal attrib)
DataQuery = "select dname from sp_data_table where "
DataQuery = DataQuery &" dattrib ='" & attrib &"' AND dclsid = " & cid
DataQuery = DataQuery & " order by dname"
‘form the query and execute it
Set datalist = OBJdbConnection.Execute(DataQuery)
attrib = attrib & " Data"
if(Not datalist.Eof) then ‘ if the result set is not empty then print it
printRecord attrib,datalist