ADO.Net Datareader, nested update problem

Ryboy

Member
Joined
Feb 6, 2008
Messages
7
Programming Experience
10+
Hi -

I'm converting a series of VB6 programs to VB.Net/ADO.Net/SQL2005. Typically the old programs (using ADO) created one db connection and used that throughout the recordset processing and nested updates as needed by the program logic. Now we are using a datareader, and making nested update calls to the database.

There are triggers on some of our tables, and now the VB.Net code is returning this exception:

A trigger returned a resultset and/or was running with SET NOCOUNT OFF while another outstanding result set was active.

The trigger is created with NOCOUNT ON, so that isn't the problem. The ADO.Net connection is created with MultipleActiveResultSets=True. Modifying the database is outside our scope since we will be deploying the converted programs piecemeal.

Any kind of ADO.Net solution to this? I know I can create multiple connections but I would rather retain one connection as the legacy code does.

TIA
 
Back
Top