|
@@ -294,7 +294,7 @@ begin
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|
|
-Procedure TDBTransaction.InternalHandleException;
|
|
|
|
|
|
+procedure TDBTransaction.InternalHandleException;
|
|
|
|
|
|
begin
|
|
begin
|
|
if assigned(classes.ApplicationHandleException) then
|
|
if assigned(classes.ApplicationHandleException) then
|
|
@@ -303,33 +303,55 @@ begin
|
|
ShowException(ExceptObject,ExceptAddr);
|
|
ShowException(ExceptObject,ExceptAddr);
|
|
end;
|
|
end;
|
|
|
|
|
|
-Procedure TDBTransaction.CheckActive;
|
|
|
|
|
|
+procedure TDBTransaction.CheckActive;
|
|
|
|
|
|
begin
|
|
begin
|
|
If not FActive Then
|
|
If not FActive Then
|
|
DatabaseError(STransNotActive,Self);
|
|
DatabaseError(STransNotActive,Self);
|
|
end;
|
|
end;
|
|
|
|
|
|
-Procedure TDBTransaction.CheckInActive;
|
|
|
|
|
|
+procedure TDBTransaction.CheckInactive;
|
|
|
|
|
|
begin
|
|
begin
|
|
If FActive Then
|
|
If FActive Then
|
|
DatabaseError(STransActive,Self);
|
|
DatabaseError(STransActive,Self);
|
|
end;
|
|
end;
|
|
|
|
|
|
-Procedure TDBTransaction.CloseTrans;
|
|
|
|
|
|
+procedure TDBTransaction.Commit;
|
|
|
|
+begin
|
|
|
|
+ EndTransaction;
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
+procedure TDBTransaction.CommitRetaining;
|
|
|
|
+begin
|
|
|
|
+ Commit;
|
|
|
|
+ StartTransaction;
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
+procedure TDBTransaction.Rollback;
|
|
|
|
+begin
|
|
|
|
+ EndTransaction;
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
+procedure TDBTransaction.RollbackRetaining;
|
|
|
|
+begin
|
|
|
|
+ RollBack;
|
|
|
|
+ StartTransaction;
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
+procedure TDBTransaction.CloseTrans;
|
|
|
|
|
|
begin
|
|
begin
|
|
FActive := false;
|
|
FActive := false;
|
|
end;
|
|
end;
|
|
|
|
|
|
-Procedure TDBTransaction.OpenTrans;
|
|
|
|
|
|
+procedure TDBTransaction.openTrans;
|
|
|
|
|
|
begin
|
|
begin
|
|
FActive := true;
|
|
FActive := true;
|
|
end;
|
|
end;
|
|
|
|
|
|
-Procedure TDBTransaction.SetDatabase (Value : TDatabase);
|
|
|
|
|
|
+procedure TDBTransaction.SetDatabase(Value: TDatabase);
|
|
|
|
|
|
begin
|
|
begin
|
|
If Value<>FDatabase then
|
|
If Value<>FDatabase then
|
|
@@ -343,14 +365,14 @@ begin
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|
|
-constructor TDBTransaction.create(AOwner : TComponent);
|
|
|
|
|
|
+constructor TDBTransaction.Create(AOwner: TComponent);
|
|
|
|
|
|
begin
|
|
begin
|
|
inherited create(AOwner);
|
|
inherited create(AOwner);
|
|
FDatasets:=TList.Create;
|
|
FDatasets:=TList.Create;
|
|
end;
|
|
end;
|
|
|
|
|
|
-Procedure TDBTransaction.CheckDatabase;
|
|
|
|
|
|
+procedure TDBTransaction.CheckDatabase;
|
|
|
|
|
|
begin
|
|
begin
|
|
If (FDatabase=Nil) then
|
|
If (FDatabase=Nil) then
|
|
@@ -369,7 +391,7 @@ begin
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|
|
-Destructor TDBTransaction.Destroy;
|
|
|
|
|
|
+destructor TDBTransaction.destroy;
|
|
|
|
|
|
begin
|
|
begin
|
|
Database:=Nil;
|
|
Database:=Nil;
|
|
@@ -389,7 +411,7 @@ begin
|
|
TDBDataset(FDataSets[i]).Transaction:=Nil;
|
|
TDBDataset(FDataSets[i]).Transaction:=Nil;
|
|
end;
|
|
end;
|
|
|
|
|
|
-Function TDBTransaction.GetDataSetCount : Longint;
|
|
|
|
|
|
+function TDBTransaction.GetDataSetCount: Longint;
|
|
|
|
|
|
begin
|
|
begin
|
|
If Assigned(FDatasets) Then
|
|
If Assigned(FDatasets) Then
|
|
@@ -422,7 +444,7 @@ begin
|
|
DatabaseErrorFmt(SDatasetRegistered,[DS.Name]);
|
|
DatabaseErrorFmt(SDatasetRegistered,[DS.Name]);
|
|
end;
|
|
end;
|
|
|
|
|
|
-Function TDBTransaction.GetDataset(Index : longint) : TDBDataset;
|
|
|
|
|
|
+function TDBTransaction.GetDataset(Index: longint): TDBDataset;
|
|
|
|
|
|
begin
|
|
begin
|
|
If Assigned(FDatasets) then
|
|
If Assigned(FDatasets) then
|