|
存储过程
create or replace procedure SP_TEST_INSERT is
begin
insert into SJB1(ZD1, ZD2, ZD3)values('1000', '1000', '1000');
end SP_TEST_INSERT;
var
lConnection: TConnection;
h: TTransactionHandle;
begin
lConnection := TConnection.Create(nil);
with lConnection do
try
ConnectionString := 'DATABASEURL=Biz:HAJ_DSDSEZHAJ_TJSJK.Database';
Connected := True;
with Transaction do
begin
h := Start(False);
try
with TStoredProc.Create(nil) do
try
Connection := lConnection;
StoredProcName := 'SP_TEST_INSERT';
Execute;
finally
Free;
end;
Commit(h);
except
RollBack(h);
Raise;
end;
end
finally
Free;
end;
|
|