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
1089
July 26, 2010 01:43PM
503
July 27, 2010 03:40AM
514
July 27, 2010 12:34PM
492
August 02, 2010 05:23AM
587
August 02, 2010 09:27AM
Re: Stored Procedures in c
482
August 02, 2010 01:25PM
498
August 02, 2010 02:37PM
518
August 02, 2010 03:08PM
449
August 03, 2010 05:41AM
528
August 03, 2010 08:57AM
494
August 04, 2010 06:46AM
525
August 04, 2010 09:22AM
525
August 04, 2010 12:31PM
468
August 04, 2010 03:28PM
576
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.