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


Author
Message
Michel Levy
Michel Levy
StrataFrame User (437 reputation)StrataFrame User (437 reputation)StrataFrame User (437 reputation)StrataFrame User (437 reputation)StrataFrame User (437 reputation)StrataFrame User (437 reputation)StrataFrame User (437 reputation)StrataFrame User (437 reputation)StrataFrame User (437 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.

Dustin Taylor
Dustin Taylor
StrataFrame Team Member (652 reputation)
Group: StrataFrame Users
Posts: 364, Visits: 771
Yep, greg nailed it. Even though it is a scalar, you still want to return a recordset, hence the need for a SELECT.

RETURN will exit the code loop immediately. It can return an integer, but that is typically used to show success or failure and isn't what you are looking for in this case.

Philipp Guntermann
Philipp Guntermann
StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)
Group: Forum Members
Posts: 141, Visits: 263
Just letting you know it does indeed work now using SELECT instead of RETURN.

Thanks again to Greg for pointing this out. Smile

Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Glad you got it working and that I was of help! BigGrin
Alex Luyando
Alex Luyando
StrataFrame User (210 reputation)StrataFrame User (210 reputation)StrataFrame User (210 reputation)StrataFrame User (210 reputation)StrataFrame User (210 reputation)StrataFrame User (210 reputation)StrataFrame User (210 reputation)StrataFrame User (210 reputation)StrataFrame User (210 reputation)
Group: StrataFrame Users
Posts: 112, Visits: 1.2K
Greg McGuffey (08/26/2008)
I'm wondering if the problem is that you are using Return instead of Select. My understanding is that Return is used to return a status code, while you'd use Select to return a record set, which ExecuteScalar will then retrieve data from.




How I wish I had read this about two hours earlier! LOL



Very handy to know.. Thanks!

________________
_____/ Regards,
____/ al
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
LOL! Glad you found a solution to your issue though!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search