Re: Stored Procedures in c
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,