[thelist] returning the equiv. of rs.RecordCount with a stored procedure? (SQL7)

Howard Cheng howcheng at ix.netcom.com
Tue Mar 5 13:37:01 CST 2002


I forgot a third way, which is probably the easiest -- just open the
recordset with the stored procedure name

Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open "myProcedure", Conn, adOpenStatic, adLockReadOnly, adCmdStoredProc

Duh. Always trying to be too fancy -- my downfall. (:

At 11:29 AM 3/5/2002 -0800, Howard Cheng wrote:
>I would say you have two ways to do it. One is to use an output parameter
>and do two select statements, the first being a "SELECT COUNT(*) FROM ...".
>The other way would be to do one statement using a UNION clause -- the
>first row would be your SELECT COUNT.

::::::::::::::::::::::
Howard Cheng
howcheng at ix.netcom.com
AIM: bennyphoebe
ICQ: 47319315




More information about the thelist mailing list