Still Can't Stored Procedure's Output Parameter from DLL.(+ the Result Set) 
Author Message
 Still Can't Stored Procedure's Output Parameter from DLL.(+ the Result Set)

What I want to do is get two things in the ONE hit to the Database's Stored
Procedure(and none of this asking for the Stored Procedure to work twice for
the same information, very inefficient.). I am using the IBuySpy Store as a
simple data access example via a Stored Procedure. And it's very important
to get the Output Parameter for a Result Set as that tell me some extra
information, e.g. the total number of records found in the database as
opposed the total records that are actually being sent to the DLL and, of
course, the web page. ( I don't want to send everything to the user's web
page, BUT I do want to send them the total Records found on the Database.)

All of IBuySpy's Example(and any that I have seen, Wrox, web sites, etc)
show getting either a Result Set OR either a Output Parameter.  But not

I have already tried Closing the DataReader after executing a
cmd.ExecuteReader() command and then executing a .ExecuteNonQuery() command.
BUT, what happens is the DataBind() method in the .aspx page needs the
DataReader to open.

Basically, you are doing some of the Data access and Data Reading in the DLL
and some in the .aspx page.
And that is the problem here.  When you call the method from the .aspx page
it goes to the DLL, I think, and then Opening and Closing Connection and
Readers from there.  But you DataBind in the .aspx page, which requires the
Reader to be Open. So you can't DataBind() if you are supposed to have the
Reader Closed to get the Output Parameters.

Does someone know what in the world is going on when you use a DLL, like
from the IBuySpy SDK C# example, when you have to make part of the Data
Access from the component in the DLL and some of the Data Access in the
.aspx page, i.e. the DataBind() method?  Where and when are you actually
doing the reading and making the connection? How and when are things being
passed up to the next object and method......

And is it possible to get BOTH the (1) Result Set and (2) the Output
parameter from a Stored Procedure, VIA a DLL  call from an .ASPX page in the
IBuySpy example?

Mon, 12 Apr 2004 23:30:19 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Getting records result by parameters to view/stored procedure

2. output parameters in stored procedure

3. Retrieving output parameters from a stored procedure call??

4. Retrieving output parameters from Oracle stored procedure

5. Using Stored Procedure with Input/Output parameters

6. ADO: Output Parameters coming back from Stored Procedures

7. Stored Procedures with Output Parameters

8. Empty output parameters when executing stored procedure through ODBC

9. Help in 'Extended Store Procedure'

10. Stored Procedure's Fetch Fails Via ODBC

11. Can't capture the rc returned from a store procedure using cursor

12. MS SQL's stored procedure!


Powered by phpBB® Forum Software