Exempel:
Sv: Räkna antalet poster
Svara
<%
set con=server.createobject("adodb.connection")
con.open "dsn"
sql = "select count(1) from tabell"
set rst=con.execute(sql)
if not rst.eof then
antal = rst(0)
else
antal = 0
end if
set rst=nothing
set con=nothing
%>