Using DataBasics to execute a non-bo-bound stored procedure


Author
Message
Philipp Guntermann
Philipp Guntermann
StrataFrame User (249 reputation)StrataFrame User (249 reputation)StrataFrame User (249 reputation)StrataFrame User (249 reputation)StrataFrame User (249 reputation)StrataFrame User (249 reputation)StrataFrame User (249 reputation)StrataFrame User (249 reputation)StrataFrame User (249 reputation)
Group: Forum Members
Posts: 141, Visits: 263
Hi,

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 VARCHAR(250),

@ComputerName VARCHAR(250),

@iKassenId int OUTPUT

 

i want to execute the sproc and get the Result integer.

Thanks !

 


Replies
Michel Levy
Michel Levy
Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)
Group: StrataFrame Users
Posts: 193, Visits: 9K
Hi Phillip,

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)

Philipp Guntermann
Philipp Guntermann
StrataFrame User (249 reputation)StrataFrame User (249 reputation)StrataFrame User (249 reputation)StrataFrame User (249 reputation)StrataFrame User (249 reputation)StrataFrame User (249 reputation)StrataFrame User (249 reputation)StrataFrame User (249 reputation)StrataFrame User (249 reputation)
Group: Forum Members
Posts: 141, Visits: 263
HI Michel,

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. ?


Michel Levy
Michel Levy
Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)
Group: StrataFrame Users
Posts: 193, Visits: 9K
Philipp,

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.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Philipp Guntermann - 17 Years Ago
Philipp Guntermann - 17 Years Ago
Philipp Guntermann - 17 Years Ago
Philipp Guntermann - 17 Years Ago
Michel Levy - 17 Years Ago
Philipp Guntermann - 17 Years Ago
Michel Levy - 17 Years Ago
Dustin Taylor - 17 Years Ago
Philipp Guntermann - 17 Years Ago
Greg McGuffey - 17 Years Ago
Philipp Guntermann - 17 Years Ago
Alex Luyando - 16 Years Ago
                         LOL! Glad you found a solution to your issue though!
Greg McGuffey - 16 Years Ago
Dustin Taylor - 17 Years Ago
Philipp Guntermann - 17 Years Ago
Greg McGuffey - 17 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search