195 |
|
function GetDBReadOnly: boolean; |
196 |
|
function GetDBSQLDialect: integer; |
197 |
|
function GetDBUserName: string; |
198 |
+ |
function GetDescription: string; |
199 |
|
function GetEmbeddedMode: boolean; |
200 |
|
function GetForcedWrites: boolean; |
201 |
|
function GetLingerDelay: string; |
208 |
|
procedure SetAutoAdmin(AValue: boolean); |
209 |
|
procedure SetDBReadOnly(AValue: boolean); |
210 |
|
procedure SetDBSQLDialect(AValue: integer); |
211 |
+ |
procedure SetDescription(AValue: string); |
212 |
|
procedure SetForcedWrites(AValue: boolean); |
213 |
|
procedure SetLingerDelay(AValue: string); |
214 |
|
procedure SetNoReserve(AValue: boolean); |
240 |
|
procedure RevokeAll; |
241 |
|
procedure SyncSubjectAccessRights(ID: string); |
242 |
|
property AutoAdmin: boolean read GetAutoAdmin write SetAutoAdmin; |
243 |
+ |
property Description: string read GetDescription write SetDescription; |
244 |
|
property Disconnecting: boolean read FDisconnecting; |
245 |
|
property ForcedWrites: boolean read GetForcedWrites write SetForcedWrites; |
246 |
|
property LingerDelay: string read GetLingerDelay write SetLingerDelay; |
564 |
|
Result := Trim(AttmtQuery.FieldByName('MON$USER').AsString); |
565 |
|
end; |
566 |
|
|
567 |
+ |
function TDatabaseData.GetDescription: string; |
568 |
+ |
begin |
569 |
+ |
Result := DatabaseQuery.FieldByName('RDB$DESCRIPTION').AsString; |
570 |
+ |
end; |
571 |
+ |
|
572 |
|
function TDatabaseData.GetEmbeddedMode: boolean; |
573 |
|
begin |
574 |
|
Result := AttmtQuery.FieldByName('MON$REMOTE_PROTOCOL').IsNull; |
973 |
|
end; |
974 |
|
end; |
975 |
|
|
976 |
+ |
procedure TDatabaseData.SetDescription(AValue: string); |
977 |
+ |
begin |
978 |
+ |
with TIBSQL.Create(IBDatabase1) do |
979 |
+ |
try |
980 |
+ |
SQL.Text := 'Comment on Database is ''' + SQLSafeString(AValue) + ''''; |
981 |
+ |
Transaction.Active := true; |
982 |
+ |
ExecQuery; |
983 |
+ |
finally |
984 |
+ |
Free; |
985 |
+ |
end; |
986 |
+ |
CurrentTransaction.Commit; |
987 |
+ |
end; |
988 |
+ |
|
989 |
|
procedure TDatabaseData.SetForcedWrites(AValue: boolean); |
990 |
|
begin |
991 |
|
IBConfigService1.SetAsyncMode(not AValue); |
1383 |
|
procedure TDatabaseData.CurrentTransactionAfterTransactionEnd(Sender: TObject); |
1384 |
|
begin |
1385 |
|
if not Disconnecting and not (csDestroying in ComponentState) then |
1386 |
+ |
begin |
1387 |
+ |
CurrentTransaction.Active := true; |
1388 |
|
Application.QueueAsyncCall(@ReloadData,0); |
1389 |
+ |
end; |
1390 |
|
end; |
1391 |
|
|
1392 |
|
procedure TDatabaseData.ApplicationProperties1Exception(Sender: TObject; |