Next Recordset question
I have a stored procedure in MSSQL2000 which returns 2 datasets when I run it from query analyser.
I use Delphi 7 Enterprise and want to display these 2 recordsets in 2 grids. I can get and display the first recordset with no problem.
I found the following code from Internet:
intRecordsAffected : Integer;
ADOStoredProc1.ProcedureName := StoredprocName;
ADODataSet1.Recordset := ADOStoredProc1.RecordSet;
ADODataSet2.Recordset := ADOStoredProc1.NextRecordset(intRecordsAffected);
In my project when I try to use the NextRecordset I get the error: ADODataSet2: Recordset is not open.
What values the intRecordsAffected must have?
- Re: using Command to set Parameters and Recordset to retrive the Query
... doesn't the rsData will be interpretate as an input parameter in the SP? ... >> Query and retrive the Recordset so I can use the Paging property ... > Even if this technique of using the parameters in the ORDER BY does work for> you, I suspect that this will defeat your objective of preventing sql> injection. ... See below for a more efficient solution> using a stored procedure. ...
- Re: Not Getting results from Stored procedure
... So, running a stored procedure from VB6 can be done fairly easily and while there are fewer whitepapers on how to best do so, I thought my website might still have a few but there are not that many left--the problem is, Microsoft is pulling old unsupported content from MSDN so a lot of those links are gone. ... In any event, when calling a stored procedure, you need to include phrase SET NOCOUNT ON, so that the 'records affected' message that occur from results of Stored proc processing aren't returned to the calling application. ... These messages appear to be returned to the calling application as a recordset. ... when calling a stored proc you need ignore the command object and use a syntactically correct string as the source parameter for the recordset's 'Open' method. ...
- Re: What am I doing wrong?
... I do not like a single display, prefering a Flex Grid to display all of the ... Dim rstCompany As Recordset ... Set rstCompany = Nothing ... Private Sub CmdUpdate_Click ...
- Re: vbscript logon script getting return data from sql sp
... Loop ... > One way to retrieve values from a stored procedure is with a Recordset ...
- Re: Missing Resultset When Calling an Stored Procedure w/a Nested
... we tried advancing to the next recordset by using the NextRecordSet ... program only returned the nested stored procedure call resultset and failed ...