Subsonic 3 fails to identify Stored Procedure Output Parameter

Posted by CmdrTallen on Stack Overflow See other posts from Stack Overflow or by CmdrTallen
Published on 2009-09-13T02:29:20Z Indexed on 2010/04/04 13:33 UTC
Read the original article Hit count: 700

Hi using Subsonic 3.0.0.3 it appears there is some issue with Subsonic identifying Stored Procedure paramters as output parameters.

In the StoredProcedures.cs class I find my stored procedure definition but the last parameter is defined incorrectly as a 'AddParameter'.

sp.Command.AddParameter("HasPermission",HasPermission,DbType.Boolean);

When I sp.Execute() and attempt to read the value of the sp.Command.OutputValues[0] the value is null.

If the definition is edited to be like this;

sp.Command.AddOutputParameter("HasPermission", DbType.Boolean);

Then the value is returned and is correct value type

I am not sure how I 'fix' this - as everytime I regen the SP class via the 'Run Custom Tool' the parameter definitions require editing. Should I edit a T4 template somehow?

Please advise.

EDIT: I forgot to mention I am using MS SQL 2008 (10.0.2531)

© Stack Overflow or respective owner

Related posts about subsonic3

Related posts about subsonic