Hi,
I am trying to insert a record into my database using 2 stored procedures. These are pasted below. The code that I am using in the
java program is as follows:
But This generates an error. Basically the GeneratePcId() stored procedure returns the value which is an integer and I want to use this as the input of InsertPrice.
I am getting an error in this line: int number = genid.getInt(1);
Can anybody advise what the problem is?
Thanks
Ricky
PROCEDURE `InsertPrice`(pc_id INT, pc_level INT, price INT, from_date DATE, to_date DATE)
BEGIN
INSERT INTO price VALUES (pc_id, pc_level, price, from_date, to_date);
END $$ PROCEDURE `GeneratePcId`()
BEGIN
select max(pc_id)+1 as newpcid from price;
END $$ [ April 02, 2007: Message edited by: Ricky James ]
[ April 02, 2007: Message edited by: Ricky James ]