c# - How can I use IMultipleResults AND return Output Parameters from a SQL Stored procedure? -


i have sql stored procedure accessing using linq-to-sql. returning multiple resultsets couple output parameters. works when run procedure query within sql, when try access c# code, not want work. 'userhasaccesstooption' parameter returns false, though set true in stored procedure.

again, returns , allows me browse other resultsets returned stored procedure, not return sql output parameters.

here code access stored procedure , return imultipleresults object:

    [functionattribute(name = "dbo.getoption")]     [resulttype(typeof(option))]     [resulttype(typeof(loanpurpose))]     [resulttype(typeof(loantype))]     [resulttype(typeof(user))]     [resulttype(typeof(client))]     [resulttype(typeof(organizationfinancialitem))]     public imultipleresults getoption(         int? optionid,          int userid,          bool getclients,          bool getotherorganizationusers,          bool getloanpurposes,          bool getloantypes,          bool getorganizationfinancialitems,         ref bool? userhasaccesstooption)     {         using (profiler.step("call \"getoption\" sproc"))         {             iexecuteresult result = this.executemethodcall(this, ((methodinfo)(methodinfo.getcurrentmethod()))                 , optionid                 , userid                 , getclients                 , getotherorganizationusers                 , getloanpurposes                 , getloantypes                 , getorganizationfinancialitems                 , userhasaccesstooption);             return (imultipleresults)(result.returnvalue);         }     } 

the values of output parameters sent last in data stream database, have read end of last result set before can output parameters.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -