Re: Command Object Output Parameter Undefined?



Ross McKay wrote:
On Thu, 5 Oct 2006 10:11:03 -0400, "Bob Barrows [MVP]" wrote:

[...]
My SOP is to use GetRows to stuff the data from the recordset into an
array, close the recordset, then retrieve the output and return
parameter values, allowing me to immediately close the connection
before starting to process the data.

An alternative is to use client-side cursors in ADO. This is
particularly useful if you use a single stored proc call to return
parameters and multiple recordsets. No messing with arrays.

I did say that, but in ASP (which I suspect the OP is using due to his use
of Response.Write), it's best to get in and get out of the database quickly,
a goal which is facilitated by using GetRows. Admittedly, using disconnected
recordsets can accomplish the same goal, but these are usually overkill in
ASP, where all one usually needs to do is grab a set of records and
transform them to html, using SQL DML statements to perform updates instead
of expensive cursors.

--
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"


.



Relevant Pages

  • RE: Error 3021
    ... The only thing I see is that after you open the recordset, ... Create proto-file names using the selected job names and storre to an array ... Save and close the document and repeat the loop ...
    (microsoft.public.access.modulesdaovba)
  • Re: Best way to populate a <SELECT>
    ... Use .GetRows() to return an array from your recordset. ... GetRows array into a routine that writes your ...
    (microsoft.public.inetserver.asp.db)
  • Re: How to make fetching and displaying of data from dtabase to workbo
    ... It actually imports at lightning speed ... ... I need to get data from the database and display in the excel sheet. ... Make a temporary array and while moving through the Recordset data ...
    (microsoft.public.excel.programming)
  • Re: Sorting VBScript Array
    ... I would like to have the option to sort ... Michael Harris containing the word recordset. ... 'This sample code sets up a 3 by 5 array, adds data to it, ... Dim sMsg ...
    (microsoft.public.scripting.vbscript)
  • Re: question about opening and closing connections on aspfaq.com
    ... if you use getrows, what do you do when you need properties: ... or use a disconnected recordset. ... containing the index numbers of the fields in the array: ... Please reply to the newsgroup. ...
    (microsoft.public.inetserver.asp.db)