From: Peter Brawley Date: November 4 2005 10:21pm Subject: Re: Stored Procedure Conversion List-Archive: http://lists.mysql.com/mysql/191287 Message-Id: <436BDEE3.8010203@earthlink.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Jesse, >VALUES (cFirstName, cLastName, cUserName, cPassword) // error on this line. >return LAST_INSERT_ID() /*@@Identity*/ >END >When I execute this, It bombs on the indicated line stating that there is a >syntax error. A stored procedure cannot return a value. PB ----- Jesse Castleberry wrote: >I am converting a MS SQL Server ASP application over to use MySQL. I have >two simple stored procedures that I need to convert. I have very little >experience with MS SQL stored procedures, and none-what-so-ever with stored >procedures in MySQL, so I really don't know what this should look like. I'll >post the first one, and if I'm able to figure it out, I'll attempt my second >one by myself. Here's the stored procedure converted as much as I can get >it. > >CREATE Procedure sp_InsertNewCamper >( >in cFirstName NVarChar(30), >in cLastName NVarChar(30), >in cUserName NVarChar(30), >in cPassword NVarChar(30) >) >BEGIN >INSERT INTO Campers (FirstName, LastName, UserName, Password) >VALUES (cFirstName, cLastName, cUserName, cPassword) // error on this line. > >return LAST_INSERT_ID() /*@@Identity*/ >END > > >When I execute this, It bombs on the indicated line stating that there is a >syntax error. > >Thanks, >Jesse > > > > -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.12.8/161 - Release Date: 11/3/2005