I am attempting to update a record using a stored procedure with a TIBCStoredProc component. The update procedure I wrote works when I execute it at the database level. I have notice I need to execute a commit after running it though. But when I execute the same stored procedure from Delphi it appears it never gets committed. Autocommit on the componet is set to true. Process runs with no errors. Thanks
Interbase 2007
Delphi CodeGear™ RAD Studio 2007 Version 11.0.2902.10471
IBDAC 2.50.0.36 for RAD Studio 2007
OS
Windows Vista 32 bit Home Premium Serveice Pack 1
***strored procedure******
create procedure SET_INVOICE_ORDERS(I_Invoice_ID INTEGER, I_Client_ID INTEGER, D_InvoiceStartDate DATE,
D_InvoiceEndtDate DATE )
AS
begin
/* Procedure Text */
UPDATE ORDERS
SET Invoice_ID = :I_Invoice_ID
WHERE
PERMANENT = True AND
ORDER_DATE >= :D_InvoiceStartDate AND
ORDER_DATE <= :D_InvoiceEndtDate AND
CLIENT_ID = :I_CLIENT_ID AND
INVOICE_ID IS NULL AND
VOID = False;
end;
*******Delphi code*******************************
//update the orders table with the invoice number
spSetInvoiceOrders.Prepare;
spSetInvoiceOrders.ParamByName('I_Invoice_ID').AsInteger:= NewInvoiceID;
spSetInvoiceOrders.ParamByName('I_Client_ID').AsInteger:= TheClientID;
spSetInvoiceOrders.ParamByName('D_InvoiceStartDate').AsDate:= dtpStartDate.Date;
spSetInvoiceOrders.ParamByName('D_InvoiceStartDate').AsDate:= dtpEndDate.Date;
spSetInvoiceOrders.ExecProc;