Re: Stored Procedures in c
Posted by: Gelu Gogancea
Date: August 02, 2010 01:25PM

Hi,
You should just to use CLIENT_MULTI_RESULTS not value of 1.

mysql_real_connect(conn,server,user,password,"db",0,NULL,CLIENT_MULTI_RESULTS)

Related to user variable @a is depending about how you set the attribute parameter of your stored procedure.For example, if you expect some values in @a,@b,@c user variables, in your myprocInsert parameter should it be set like INOUT every of this parameters.

DELIMITER $$
CREATE PROCEDURE myprocInsert (INOUT a INT,INOUT b INT,INOUT c INT)
BEGIN

SET a=100;
SET b=50;
SET c=10;
END $$
DELIMITER ;

Now if you call like :
call myprocInsert(@a,@b,@c);
...for sure your user variables @a,@b,@c will not be null.

I hope that it help
Regards,

Options: ReplyQuote


Subject
Views
Written By
Posted
1229
July 26, 2010 01:43PM
589
July 27, 2010 03:40AM
616
July 27, 2010 12:34PM
584
August 02, 2010 05:23AM
679
August 02, 2010 09:27AM
Re: Stored Procedures in c
577
August 02, 2010 01:25PM
582
August 02, 2010 02:37PM
609
August 02, 2010 03:08PM
547
August 03, 2010 05:41AM
612
August 03, 2010 08:57AM
578
August 04, 2010 06:46AM
640
August 04, 2010 09:22AM
686
August 04, 2010 12:31PM
559
August 04, 2010 03:28PM
646
August 04, 2010 05:34PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.