[thelist] Retrieving a Value from a Stored Procedure

Jeremy Weiss jweiss03 at comcast.net
Fri Jan 10 14:06:01 CST 2003


I've got a stored procedure that takes an array, loops through it adding
each value to a temp table then compares the contents of the temp table with
another table and counts the number of records that are equal.  The code
snip below is where it actually compares the tables and counts the matches.
The stored proc works fine in Query Analyzer, btw.

-----
select count(*) from #zip a, zip_tbl b where a.zip = b.zipcode
-----

Now what I'm trying to do is to get it to pass the count here back to the
page that called it so that I can do...
if R(0) <> 0 then
   bla bla bla
end if

For some reason, all it's passing back is the Return Code which is always 0
(thankfully).  I've got several other stored procs that have a similar line
of code at the end and they all pass the results back as a recordset just
fine.

Suggestions? Ideas? Shoot me and put me out of my misery?

TIA
-Jeremy





More information about the thelist mailing list