31 |
|
{ TDBDataModule } |
32 |
|
|
33 |
|
TDBDataModule = class(TDataModule) |
34 |
< |
AccessRightsCHILDCOUNT: TIBLargeIntField; |
34 |
> |
AccessRightsCHILDCOUNT: TIBIntegerField; |
35 |
|
AccessRightsDisplayName: TStringField; |
36 |
|
AccessRightsID: TIBStringField; |
37 |
|
AccessRightsImageIndex: TLongintField; |
449 |
|
DataSet.FieldByName('SEC$ACTIVE').AsBoolean := false; |
450 |
|
DataSet.FieldByName('DBCreator').AsBoolean := false; |
451 |
|
DataSet.FieldByName('SEC$PLUGIN').AsString := 'Srp'; |
452 |
< |
DataSet.FieldByName('UserID').AsInteger := 0; |
453 |
< |
DataSet.FieldByName('GroupID').AsInteger := 0; |
452 |
> |
// DataSet.FieldByName('UserID').AsInteger := 0; |
453 |
> |
// DataSet.FieldByName('GroupID').AsInteger := 0; |
454 |
|
DataSet.FieldByName('SEC$PASSWORD').Clear; |
455 |
|
RoleNameList.Active := false; {Prevent role assignments until saved} |
456 |
|
UserTags.Active := false; {ditto} |
458 |
|
|
459 |
|
procedure TDBDataModule.UserListAfterOpen(DataSet: TDataSet); |
460 |
|
begin |
461 |
< |
UserListSource.DataSet := UserList; |
461 |
> |
if UserListSource.DataSet <> DataSet then |
462 |
> |
UserListSource.DataSet := DataSet; |
463 |
|
RoleNameList.Active := true; |
464 |
|
UserTags.Active := true; |
465 |
|
end; |
1060 |
|
end; |
1061 |
|
|
1062 |
|
procedure TDBDataModule.ActivateShadow; |
1063 |
+ |
var DBConnected: boolean; |
1064 |
|
begin |
1065 |
< |
IBConfigService1.ActivateShadow; |
1065 |
> |
DBConnected := IBDatabase1.Connected; |
1066 |
> |
IBDatabase1.Connected := false; |
1067 |
> |
try |
1068 |
> |
IBConfigService1.ActivateShadow; |
1069 |
> |
finally |
1070 |
> |
IBDatabase1.Connected := DBConnected; |
1071 |
> |
end; |
1072 |
|
MessageDlg('Shadow Database activated. You should now rename the file or change the database alias name to point to the shadow', |
1073 |
|
mtInformation,[mbOK],0); |
1074 |
|
end; |
1388 |
|
|
1389 |
|
procedure TDBDataModule.LegacyUserListAfterOpen(DataSet: TDataSet); |
1390 |
|
begin |
1391 |
< |
UserListSource.DataSet := LegacyUserList; |
1391 |
> |
if UserListSource.DataSet <> LegacyUserList then |
1392 |
> |
UserListSource.DataSet := LegacyUserList; |
1393 |
|
if IBDatabase1.Connected then |
1394 |
|
begin |
1395 |
|
CurrentTransaction.Active := true; |
1505 |
|
|
1506 |
|
procedure TDBDataModule.IBDatabase1BeforeDisconnect(Sender: TObject); |
1507 |
|
begin |
1508 |
+ |
FDBHeaderScanned := false; |
1509 |
|
FDisconnecting := true; |
1510 |
|
end; |
1511 |
|
|