VB6 and ADO problem in getting a recordset

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hello all,

I have an odd problem. I have a stored procedure that make use of
cursors to build dynamic sql for returning multiple recordsets in one
stored procedure call from VB6 (via ADO sql exec command).

VB is able to process each recordset until one particular recordset
(each is a result from different databases that we have on our SQL
Server). AT that particular recordset/database, a NextRecordSet
returns nothing, and VB assumes that there are no more recordsets after
that.

But therein lies the problem, there exists additional recordsets after
that particular recordset. Doing a "exec <name of stored procedure>"
returns everything that VB needs.

Does anybody have any idea why ADO/VB would consider that particular
recordset to be nothing/null and how I can fix that? It looks like to
be a data issue that is causing ADO to puke.

Todd

.



Relevant Pages

  • Re: Databases - DAO and ADO
    ... the readme files (except the one I think is in German;) ... I was very impressed with the speed comparisions between the ADO and SQLite. ... The Example I've posted does work with Recordsets. ... SQL has a lot more to offer - so why not use that builtin ...
    (microsoft.public.vb.general.discussion)
  • RE: ado connection to access vs. sql server?
    ... > data in multiple files, which needs quite careful tracking, several ADO ... > connections and many recordsets. ... > I need to perform quite tricky calculations (too tricky to be done using SQL ... > be kept practically in Excel workbooks). ...
    (microsoft.public.excel.programming)
  • Re: Operation is not allowed...
    ... Your original problem stemmed from using an ADODB.Recordset object to commit ... Recordsets are for *retrieving* data, ... backed by some of the worst SQL 2000 database design I've ever ... Well, instead of going back, fixing the typo and fixing ...
    (microsoft.public.inetserver.asp.general)
  • Re: Bizarre error causes update of one record to update ALL records
    ... > though only ID=1 was specified in the SQL where clause. ... cursor type. ... You should always include the primary key field when using ... Go back to doing it for your readonly recordsets (which are the only type ...
    (microsoft.public.inetserver.asp.db)
  • Re: aus zwei verschiedenen Recordsets
    ... > dieses Recordsets aus zwei verschiedenen ADO-Connections stammen. ... da das keine SQL Syntax dafür kennt. ... da wäre es der erwähnte Verbindungsserver, ...
    (microsoft.public.de.vb.datenbank)