Unistoredproc.applyupdates Error
Posted: Thu 13 Jun 2013 13:35
Hello,
I have a store procedure in PostgreSQL :
CREATE OR REPLACE FUNCTION "UPDATEBALANCES"(a integer, b money)
RETURNS void AS
$BODY$UPDATE "BALANCES"
SET "CODE" = $1, "BALANCE" = $2 $BODY$
LANGUAGE sql VOLATILE
COST 100;
ALTER FUNCTION "UPDATEBALANCES"(integer, money)
OWNER TO postgres;
in design time I set :
Unistoredproc.cacheupdates := true ;
unistoredproc.storedprocname :='UPDATEBALANCES';
try
uniconnection.StartTransaction;
unistoredproc.Close;
unistoredproc.ParamByName('a').VALUE := 100;
unistoredproc.ParamByName('b').VALUE := 200000;
unistoredproc.Execute;
unistoredproc.ApplyUpdates;
UniConmection.Commit;
except
unistoreproc.RestoreUpdates;
UniConmection.Rollback;
end;
after i run unistoredproc.ApplyUpdates error occurs "Can not perform this operation on closed dataset" .. why this error occur ?do i need to applyupdates unistoredproc ? pls advise.. thanks a lot..
I have a store procedure in PostgreSQL :
CREATE OR REPLACE FUNCTION "UPDATEBALANCES"(a integer, b money)
RETURNS void AS
$BODY$UPDATE "BALANCES"
SET "CODE" = $1, "BALANCE" = $2 $BODY$
LANGUAGE sql VOLATILE
COST 100;
ALTER FUNCTION "UPDATEBALANCES"(integer, money)
OWNER TO postgres;
in design time I set :
Unistoredproc.cacheupdates := true ;
unistoredproc.storedprocname :='UPDATEBALANCES';
try
uniconnection.StartTransaction;
unistoredproc.Close;
unistoredproc.ParamByName('a').VALUE := 100;
unistoredproc.ParamByName('b').VALUE := 200000;
unistoredproc.Execute;
unistoredproc.ApplyUpdates;
UniConmection.Commit;
except
unistoreproc.RestoreUpdates;
UniConmection.Rollback;
end;
after i run unistoredproc.ApplyUpdates error occurs "Can not perform this operation on closed dataset" .. why this error occur ?do i need to applyupdates unistoredproc ? pls advise.. thanks a lot..