Savas Ates wrote:
> I have a stored procedure below.. When I run it with a well parameter
> in query analyser 3 of select statements return me. (i named select
> statements 1,2,3)
> But in asp page when i call this procedure same as query analyser it
> returns me 2 select statements value? what is the problem ?
>
I don't understand why you think you should be getting 3 resultsets.
Depending on the result of the first IF statement, you should be receiving
either resultset 1 OR resultset 2. If you get resultset 2, then, if the last
if statement is true, you will get resultset 3 as well. In other words, you
will get one of these possibilities:
resultset 1 only
resultset 2 only
resultset 2 and resultset 3 *
I think you need to provide a create table statement and insert statements
to provide sample data to help us to understand what your problem really is.
Bob Barrows
* In asp, you will need to use NextRecordset to get both resultsets - you
should make it a habit to start your stored procedures with "SET NOCOUNT ON"
to avoid getting extra resultsets containing informational messages
returned:
create someprocedure as
set nocount on
etc.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
|