Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have a recordset-returning DataEn

Status
Not open for further replies.

Jerrycurl

Programmer
Aug 4, 1999
85
US
I have a recordset-returning DataEnvironment command thats source is a stored procedure. The stored procedure looks something like this:

CREATE PROCEDURE sproc1 @var1 varchar(6) AS
<SELECT statement 1>
if @@rowcount = 1 return else
begin
<SELECT statement 2>
if @@rowcount > 0 return
end
end

The problem is when I execute the datacommand:
de.sproc1 &quot;paramater1&quot;

the resulting recordset (de.rssproc1) is that of the first SELECT statement, but what I want is the second SELECT statement (because @@rowcount was not equal to 1). Does that make sense? Is there a way to make the recordset hold the results of the last SELECT statement that was executed instead of the first?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top