Unix Technical Forum

HELP: FUNCTION and PROCEDURE best practices....

This is a discussion on HELP: FUNCTION and PROCEDURE best practices.... within the MySQL forums, part of the Database Server Software category; --> Its not a question of marking them as IN or OUT or INOUT.... CREATE PROCEDURE `sp_test01`(IN _var1 INT, IN ...


Go Back   Unix Technical Forum > Database Server Software > MySQL

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 09:15 AM
daniel@mfaconsulting.com
 
Posts: n/a
Default HELP: FUNCTION and PROCEDURE best practices....

Its not a question of marking them as IN or OUT or INOUT....

CREATE PROCEDURE `sp_test01`(IN _var1 INT, IN _var2 INT, OUT _Ret INT)
BEGIN

START TRANSACTION;

-- Do some insert

COMMIT;

SET _Ret = 1;

END$$

....its that in C#

I have to call this with variables called _var1,_var2 and _Ret.....if
you get that wrong it doesn't work. Specifically WRT getting the _Ret
variable!

Anyway, thanks for the reply.

D.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 09:15 AM
Jerry Stuckle
 
Posts: n/a
Default Re: HELP: FUNCTION and PROCEDURE best practices....

daniel@mfaconsulting.com wrote:
> Its not a question of marking them as IN or OUT or INOUT....
>
> CREATE PROCEDURE `sp_test01`(IN _var1 INT, IN _var2 INT, OUT _Ret INT)
> BEGIN
>
> START TRANSACTION;
>
> -- Do some insert
>
> COMMIT;
>
> SET _Ret = 1;
>
> END$$
>
> ...its that in C#
>
> I have to call this with variables called _var1,_var2 and _Ret.....if
> you get that wrong it doesn't work. Specifically WRT getting the _Ret
> variable!
>
> Anyway, thanks for the reply.
>
> D.
>


Yep, that's true. That's the way SP's work.

But the same is true with C# functions, is it not? If you don't call
them with the correct parameters it doesn't work?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:58 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com