List:General Discussion« Previous MessageNext Message »
From:Jesse Castleberry Date:November 4 2005 9:51pm
Subject:Stored Procedure Conversion
View as plain text  
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

Thread
Stored Procedure ConversionJesse Castleberry4 Nov
  • Re: Stored Procedure ConversionPeter Brawley4 Nov