MySQL Forums
Forum List  »  Stored Procedures

My Store procdure not return result
Posted by: Dong Feng
Date: February 08, 2006 03:40PM

I create store procedure as blow
CREATE PROCEDURE `Add_Test`(in sName varchar(40),in nUserID int)
BEGIN
declare nCompanyID INTEGER default -1;
declare continue handler for sqlexception Rollback;
start transaction;
Insert into Company (Company_Name,Address_Type,Status,Notes,User_ID,Last_Modify,Type,Web_Site,Phone,Email,Fax,Cell,Create_Time,Create_By)
values (sName,'','A','',nUserID,now(),'C','','','','','',now(),nUserID);
commit;
Set nCompanyID = LAST_INSERT_ID();
Select * from Company where company_id = nCompanyID;
END $$

company_id is auto inc.
after I insert the record, the select statment not get any result?
Any help for me? I user default isolation leve for mysql.
MySQL version is 5.0.18

Options: ReplyQuote


Subject
Views
Written By
Posted
My Store procdure not return result
1939
February 08, 2006 03:40PM


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.