dim cmd as adodb.command
dim rs as adodb.recordset
dim i as integer
set cmd=new adodb.command
cmd.activeconnection=connectionname
cmd.commandtype=adcmdtext
cmd.commandtext="select name from sysobjects where type='U'"
set rs=cmd.execute()
for i=0 to rs.recordcount
print rs(i).value
next i