Home Forums Programming General OLEDB Driver Fails to Return @@Identity RE: OLEDB Driver Fails to Return @@Identity

  • Anthony,

    There should not be any reason why you can't use the OLEDB provider -we use both and have not noticed this problem.

    Is the comma at the end of  the third line of the proc a mistype or is it really in your procedure? If so then this obviuosly should not be there and may explain the problem.

    However as a generalisation I would suggest that if you just want to return the @@Identity value that you use an output parameter and just return this rather than returning a single value in a recordset - which has much higher overheads (and on the same track also include the SET NOCOUNT ON option which prevents the count of records affected from being returned).

    Hope this is of some help

     

    David Saville

    http://www.aldex.co.uk