Return parameters http://www.davidpenton.com/testsite/scratch/adodb.command.asp
Return parameters and multiple recordsets http://www.davidpenton.com/testsite/scratch/adodb.command2.asp http://www.davidpenton.com/testsite/scratch/adodb.command3.asp David L. Penton, Microsoft MVP JCPenney Application Specialist / Lead "Mathematics is music for the mind, and Music is Mathematics for the Soul. - J.S. Bach" [EMAIL PROTECTED] Do you have the VBScript Docs or SQL BOL installed? If not, why not? VBScript Docs: http://www.davidpenton.com/vbscript SQL BOL: http://www.davidpenton.com/sqlbol -----Original Message----- From: Steve Abaffy [mailto:[EMAIL PROTECTED]] Yes I tried that, but all I got back was the last select statement. I even tried create Procedure ProcedureName @parm1 int, @parm2 int output Processing here Select @parm2 = Count(*) from table Select * from table GO and in the ASP page Set RS = Conn.Execute("Execute ProdcureName @Parm1=1") Response.write RS("Parm2") I get the error "Can not find ordinal referenced in the line above" -----Original Message----- From: Chris Tifer [mailto:[EMAIL PROTECTED]] If I was using a stored procedure, I would probably just set up an output parameter with the count. SET NOCOUNT ON SELECT @myOutputVar = COUNT(*) FROM TABLE SELECT * FROM TABLE SET NOCOUNT OFF Unless there's a specific need for EACH row to also return the total in the table, but for the life of me I can't come up with a reason. Chris Tifer ----- Original Message ----- From: "Steve Abaffy" <[EMAIL PROTECTED]> > Hello, > > How do I write a query that will return all the rows in a table with the > addition of the count of those rows? > Something like > > Select Count(*),* From table > > Thanks in Advandce --- You are currently subscribed to activeserverpages as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED]
