Is it possible in ADO to execute a (select) stored procedure, but just
return the number of records, not the actual data.

My client has some stored procedures which if executed with certain
parameters can return thousands of rows. I would like to execute a check
prior to returning these rows across the (very slow) network

** I understand that the SP must execute on the server. It is just the
passing of the data back which concerns me. **

I cannot change the stored procedures, only the ADO code.

Thanks.

Re: get record count from stored procedure without passing DATA back? by Sahil

Sahil
Wed Jan 26 14:33:25 CST 2005

It's just as possible as knowing what's inside a gift, without opening the
wrapping.
You wouldn't know unless someone told you in advance - you need a second
stored proc to return you the count.

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik



"John B" <spamfree@hotmail.con> wrote in message
news:Lv-dnQ6ENplKa2rcRVn-iQ@mycybernet.net...
> Is it possible in ADO to execute a (select) stored procedure, but just
> return the number of records, not the actual data.
>
> My client has some stored procedures which if executed with certain
> parameters can return thousands of rows. I would like to execute a check
> prior to returning these rows across the (very slow) network
>
> ** I understand that the SP must execute on the server. It is just the
> passing of the data back which concerns me. **
>
> I cannot change the stored procedures, only the ADO code.
>
> Thanks.
>
>



Re: get record count from stored procedure without passing DATA back? by WJ

WJ
Wed Jan 26 14:44:00 CST 2005


"John B" <spamfree@hotmail.con> wrote in message
news:Lv-dnQ6ENplKa2rcRVn-iQ@mycybernet.net...

> I cannot change the stored procedures, only the ADO code.
>

In this case you do not need SP. Just code "select count(aField) as
TotalRecord from aTable where such and such.."

on return, check the field "TotalRecord"

John Webbs