faqts : Computers : Programming : Languages : Asp : ASP/VBScript : Common Problems

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

2 of 3 people (67%) answered Yes
Recently 0 of 1 people (0%) answered Yes

Entry

Is it possible for me to store the result of a query in a variable?

Jul 17th, 2000 05:16
unknown unknown, Bruce Anwyl


Yes, like this:
sqlStmt = "SELECT Count(Alumni.ID) AS CountOfAlumni
FROM Alumni"
Set rsCount = connDB.execute(sqlStmt)
TotalAlumni = rsCount("CountOfAlumni")
There are <% Response.Write(TotalAlumni) %> registered Alumni.



© 1999-2004 Synop Pty Ltd