ObjectDataSource_Inserted e.ReturnValue always 1? RRS feed

  • Question

  • User-2005308920 posted

    Hi there,

    I've been trawling these forums, as well as google looking for a solution. The only instance I did find, is by someone who then later solved it by doing exactly as i'm doing, so i'm now baffled.

    Basically I have a Dataset with a DataTable and TableAdapter, in there i have an Insert method. This calls a stored procedure.

    The stored procedure has something like




    At the end of it, tihs works fine, I can see that from calling the proc in management studio.

    Even calling the method directly from some asp.net code works fine, the resulting int has the ID i want.

    But, the _Inserted method of the objectdatasource doesn't work, e.ReturnValue is always a 1?

    Can anyone shed some light on this please before I have to resort to changing all my procs to have output parameters on there.

    Thank you

    // Carl

    Wednesday, February 9, 2011 10:47 AM

All replies

  • User-359936451 posted

    The 1 only indicates that one record has been changed or processed, nothing more.

    What are you actually trying to do? 

    Wednesday, February 9, 2011 10:52 AM