Return all InfoMessages

From: Steve (morriszone_at_hotmail.com)
Date: 03/17/05


Date: 17 Mar 2005 10:20:08 -0800

I would like to return all messages from a 3 cursor stored procedure to
the user of an admin AccessXP front end to a SQL Server 2000 database
via ADO 2.7. An admin updates a table that stores NTLogins/users/roles
and fires a sproc to update the server. I've tried looping through
pConnection.Errors within the InfoMessage event and this returns the
message I see in QA for each cursor if the user has only changed 1
record. However if the user first updates more than 1 record in Access
and then executes this sproc (via a command object) I still get back
only 1 message per cursor as opposed to 1 message per cursor per record
as I do in QA. pConnection.Errors.Count always stays at 3 no matter how
many records are updated, though in QA I get 3 * the number of records
messages. I can also reproduce this with print. QA will display say
print messages for 3 records but ADO will only
display 3 messages, those for the first record in the batch. I've tried
using a stream but get the same results. I can load all the info into
an output parameter but would like to use InfoMessages to build 1
complete string for Msgbox.



Relevant Pages

  • Re: C5 woes. How stable is VFP really?
    ... After that I close the SQL server cursor and work with my manual cursor instead. ... a VFP9 app on a really old machine ... app was under more "pressure", VFP showed ...
    (microsoft.public.fox.programmer.exchange)
  • Re: SQL HELP PLEASE!! Cursor only returns part of the data
    ... First of all, it's not the cursor as such that is bad, it is the looping. ... and re-writing it to handle set-based data will cost you more ... set-based solution do not perform well, ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)
  • Re: Using Cursors
    ... it seems I've stirred up a hornet's nest with my cursor question. ... finding the discussion valuable in my circumstances (moving from Oracle to ... SQL Server). ... > DECLARE curEpisode SCROLL CURSOR FOR ...
    (microsoft.public.sqlserver.programming)
  • Re: An ALTER TABLE on a huge table...
    ... Columnist, SQL Server Professional ... We know for large tables the transaction log growth will be huge, and perhaps too much for some customers machines. ... newly added field to 0 in all rows using a cursor, then swithcing back to the original recovery model. ... Perhaps BCP out, truncate table, alter table, BCP back? ...
    (microsoft.public.sqlserver.server)
  • Re: Row Order
    ... morphed into a flat-file design into SQL Server. ... Server is a relational database that assumes set operations and doesn't let ... > somebody doesn't want to have to add an ORDER BY clause to the cursor ...
    (microsoft.public.sqlserver.programming)