Strange error when SPROC has nocount NOT on

  • Question,

    We call a SPROC from VB and this sproc creates a memory table and does some inserts into that memory table, then joins that memory table and gives a resultset back.

    Now everything works fine on the developement server. But on the test server we have to put 'Set Nocount on' in the SPROC otherwise VB will give the following error :

    Source: ADODB.Recordset

    Description: Cannot change the ActiveConnection property of a Recordset object which has a Command object as its source.

    Does anybody have any idea ???????

  • What does your VB code do? Can you give us a look at the section affected, could be something wrong that just did not show up with regards to developement server connection.

  • We foud it already was the Server setting.....NO COUNT...

  • I think with no count off it tries to return an extra recordset which contains the number of rows affected (like the output in Query analyser). You can either reference the correct recordset in the recordset collection or set nocount on so this extra recordset is not returned.

    Regards,

    Andy Jones

    .

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply