Poblem with insert query RRS feed

  • Question

  • I am invoking Insert query using Prepared statement in java.

    After invoking query I am fetching identity record.Some time this record come and some time not.

    But when I applied Set No Count before insert Query

    I is working fine .

    Plese tell me the impact on SET NO COUNT statement in insert query.Why is this working after applying set no count.

    Wednesday, May 25, 2011 12:24 PM


  • hi, 

    the SET NOCOUNT ON statement makes sure that no more messages like '20 rows affected' are emitted. These messages can mess up the normal behavior you would expect from calling that sp.

    Regards, Nico
    • Marked as answer by S.P Singh Monday, May 30, 2011 5:03 AM
    Wednesday, May 25, 2011 12:36 PM