I am wondering if someone could provide a sample code as how I can use
DataBasics.DataSources[""].ExecuteStoredProcedure(..)
My sproc takes 2 varchar input parameters and returns an integer value:
@HWID
@ComputerName
@iKassenId
i want to execute the sproc and get the Result integer.
Thanks !
Does your procedure run fine (and returns a nice integer value) when executed from within a BO?
And why not using a BO? I've a lot of SP and Scalar functions on a SQL database, all in dbo schema, and I use any of my BOs (no one connecting on dbo schema) to run theses SP and functions (you need to grant exec in an intermediate SP, or execute as ..., and revert after execution)
thanks for you reply. i dont know i it runs using a bo, and for this particular function i dont really want to use a bo.
i dont quite understand what you mean by:
(you need to grant exec in an intermediate SP, or execute as ..., and revert after execution)
From the Help-Document, the ExecuteStoredProcedure function is capable of doing what i want. i dont understand why i would need to use a bo for it. ?
Using a BO is for a maintenance purpose (All the business code is in the BO, all the connections against SQL server run from a BO to DL)
And the intermediate SP (or execute as.. revert) is for a security purpose: I never expose a SP directly in the AppUser schema.