MySQL Forums
Forum List  »  Stored Procedures

Row not being added. But pkey is getting incremented
Posted by: John Noble
Date: December 20, 2022 03:17AM

Hi folks,

My stored procedure (see below) is set to just add a new row. When I call it with test data from WorkBench it works fine. But when I call it from my .NET program nothing is getting updated. However, it does increment the pKey field in the table.

Any idea what might be causing this? Some sort of lock perhaps ?

John

CREATE DEFINER=`root`@`localhost` PROCEDURE `usp_remittancesInsert`(
IN p_vendorID varchar(7),
IN p_vendorName varchar(100),
IN p_address1 varchar(50),
IN p_address2 varchar(50),
IN p_town varchar(50),
IN p_postcode varchar(15),
IN p_documentNumber varchar(30),
IN p_ref1 varchar(30),
IN p_docType varchar(3),
IN p_docDate date,
IN p_payable decimal(14,2),
IN p_balance decimal(14,2),
IN p_remit decimal(14,2),
IN p_invoiceCurrency varchar(3),
IN p_paymentDate date
)
BEGIN

INSERT INTO remittances (vendorID, vendorName, address1, address2, town, postcode, documentNumber, ref1, docType, docDate, payable, balance, remit, invoiceCurrency, paymentDate)
VALUES (p_vendorID, p_vendorName, p_address1, p_address2, p_town, p_postcode, p_documentNumber, p_ref1, p_docType, p_docDate, p_payable, p_balance, p_remit, p_invoiceCurrency, p_paymentDate);

END

Options: ReplyQuote


Subject
Views
Written By
Posted
Row not being added. But pkey is getting incremented
231
December 20, 2022 03:17AM


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.