ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/examples/DBAdmin/DataModule.lfm
Revision: 359
Committed: Tue Dec 7 09:37:32 2021 UTC (2 years, 4 months ago) by tony
File size: 45576 byte(s)
Log Message:
Fixes Merged

File Contents

# User Rev Content
1 tony 272 object DBDataModule: TDBDataModule
2 tony 158 OldCreateOrder = False
3     Height = 552
4 tony 272 HorizontalOffset = 767
5     VerticalOffset = 395
6 tony 158 Width = 730
7     object IBDatabase1: TIBDatabase
8 tony 359 Connected = True
9 tony 158 AfterConnect = IBDatabase1AfterConnect
10     AfterDisconnect = IBDatabase1AfterDisconnect
11     BeforeDisconnect = IBDatabase1BeforeDisconnect
12     OnLogin = IBDatabase1Login
13     CreateIfNotExists = False
14     AllowStreamedConnected = False
15 tony 318 DatabaseName = 'localhost:employee'
16 tony 158 Params.Strings = (
17     'lc_ctype=UTF8'
18     'user_name=SYSDBA'
19     'sql_role_name=RDB$ADMIN'
20     )
21     DefaultTransaction = CurrentTransaction
22     IdleTimer = 0
23     TraceFlags = []
24     UseDefaultSystemCodePage = False
25 tony 315 Left = 40
26     Top = 24
27 tony 158 end
28     object CurrentTransaction: TIBTransaction
29     Active = False
30     DefaultDatabase = IBDatabase1
31     Params.Strings = (
32     'read_committed'
33     'rec_version'
34     'nowait'
35     )
36     AfterTransactionEnd = CurrentTransactionAfterTransactionEnd
37 tony 315 Left = 168
38     Top = 24
39 tony 158 end
40     object ExecDDL: TIBSQL
41     Database = IBDatabase1
42 tony 272 CaseSensitiveParameterNames = False
43 tony 158 GenerateParamNames = False
44     UniqueParamNames = False
45     ParamCheck = True
46     SQL.Strings = (
47     ''
48     )
49 tony 359 Scrollable = False
50 tony 158 Transaction = CurrentTransaction
51 tony 315 Left = 152
52     Top = 208
53 tony 158 end
54     object DatabaseQuery: TIBQuery
55     AllowAutoActivateTransaction = False
56     Database = IBDatabase1
57     Transaction = CurrentTransaction
58     AfterOpen = DatabaseQueryAfterOpen
59     BeforeClose = DatabaseQueryBeforeClose
60     BufferChunks = 1000
61     CachedUpdates = False
62 tony 272 CaseSensitiveParameterNames = False
63 tony 210 EnableStatistics = False
64 tony 158 GenerateParamNames = False
65     GeneratorField.ApplyOnEvent = gaeOnNewRecord
66 tony 210 MasterDetailDelay = 0
67 tony 158 SQL.Strings = (
68     'SELECT * FROM RDB$DATABASE, MON$DATABASE'
69     )
70     Params = <>
71 tony 315 SQLFiltered = False
72 tony 158 DataSetCloseAction = dcSaveChanges
73 tony 315 TZTextOption = tzOffset
74     DefaultTZDate = 43831
75     Left = 288
76     Top = 24
77 tony 158 end
78     object DBCharSet: TIBQuery
79     AllowAutoActivateTransaction = False
80     Database = IBDatabase1
81     Transaction = CurrentTransaction
82     AfterClose = DBCharSetAfterClose
83     BeforeOpen = DBCharSetBeforeOpen
84     AutoCommit = acCommitRetaining
85     BufferChunks = 1000
86     CachedUpdates = False
87 tony 272 CaseSensitiveParameterNames = False
88 tony 210 EnableStatistics = False
89 tony 158 GenerateParamNames = False
90     GeneratorField.ApplyOnEvent = gaeOnNewRecord
91 tony 210 MasterDetailDelay = 0
92 tony 158 SQL.Strings = (
93     'Select Trim(A.RDB$CHARACTER_SET_NAME) as RDB$CHARACTER_SET_NAME'
94     ' From RDB$DATABASE A'
95     )
96     Params = <>
97     UpdateObject = UpdateCharSet
98 tony 315 SQLFiltered = False
99 tony 158 DataSetCloseAction = dcSaveChanges
100 tony 315 TZTextOption = tzOffset
101     DefaultTZDate = 43831
102     Left = 424
103     Top = 32
104 tony 158 end
105     object ShadowFiles: TIBQuery
106     AllowAutoActivateTransaction = False
107     Database = IBDatabase1
108     Transaction = CurrentTransaction
109     OnCalcFields = ShadowFilesCalcFields
110     BufferChunks = 1000
111     CachedUpdates = False
112 tony 272 CaseSensitiveParameterNames = False
113 tony 210 EnableStatistics = False
114 tony 158 GenerateParamNames = False
115     GeneratorField.ApplyOnEvent = gaeOnNewRecord
116 tony 210 MasterDetailDelay = 0
117 tony 158 SQL.Strings = (
118     'Select * From RDB$Files Where RDB$Shadow_Number <> 0 '
119     'Order by RDB$Shadow_Number, RDB$FILE_SEQUENCE'
120     )
121     Params = <>
122 tony 315 SQLFiltered = False
123 tony 158 DataSetCloseAction = dcDiscardChanges
124 tony 315 TZTextOption = tzOffset
125     DefaultTZDate = 43831
126     Left = 32
127     Top = 208
128 tony 158 object ShadowFilesRDBFILE_NAME: TIBStringField
129     FieldKind = fkData
130     FieldName = 'RDB$FILE_NAME'
131     Index = 0
132     LookupCache = False
133     ProviderFlags = [pfInUpdate, pfInWhere]
134     ReadOnly = False
135     Required = False
136     Size = 253
137     end
138     object ShadowFilesRDBFILE_SEQUENCE: TSmallintField
139     FieldKind = fkData
140     FieldName = 'RDB$FILE_SEQUENCE'
141     Index = 1
142     LookupCache = False
143     Origin = 'RDB$FILES.RDB$FILE_SEQUENCE'
144     ProviderFlags = [pfInUpdate, pfInWhere]
145     ReadOnly = False
146     Required = False
147     end
148     object ShadowFilesRDBFILE_START: TIntegerField
149     FieldKind = fkData
150     FieldName = 'RDB$FILE_START'
151     Index = 2
152     LookupCache = False
153     Origin = 'RDB$FILES.RDB$FILE_START'
154     ProviderFlags = [pfInUpdate, pfInWhere]
155     ReadOnly = False
156     Required = False
157     end
158     object ShadowFilesRDBFILE_LENGTH: TIntegerField
159     FieldKind = fkData
160     FieldName = 'RDB$FILE_LENGTH'
161     Index = 3
162     LookupCache = False
163     Origin = 'RDB$FILES.RDB$FILE_LENGTH'
164     ProviderFlags = [pfInUpdate, pfInWhere]
165     ReadOnly = False
166     Required = False
167     end
168     object ShadowFilesRDBFILE_FLAGS: TSmallintField
169     FieldKind = fkData
170     FieldName = 'RDB$FILE_FLAGS'
171     Index = 4
172     LookupCache = False
173     Origin = 'RDB$FILES.RDB$FILE_FLAGS'
174     ProviderFlags = [pfInUpdate, pfInWhere]
175     ReadOnly = False
176     Required = False
177     end
178     object ShadowFilesRDBSHADOW_NUMBER: TSmallintField
179     FieldKind = fkData
180     FieldName = 'RDB$SHADOW_NUMBER'
181     Index = 5
182     LookupCache = False
183     Origin = 'RDB$FILES.RDB$SHADOW_NUMBER'
184     ProviderFlags = [pfInUpdate, pfInWhere]
185     ReadOnly = False
186     Required = False
187     end
188     object ShadowFilesFileMode: TStringField
189     FieldKind = fkCalculated
190     FieldName = 'FileMode'
191     Index = 6
192     LookupCache = False
193     ProviderFlags = [pfInUpdate, pfInWhere]
194     ReadOnly = False
195     Required = False
196     end
197     end
198     object SecGlobalAuth: TIBQuery
199     AllowAutoActivateTransaction = False
200     Database = IBDatabase1
201     Transaction = CurrentTransaction
202     BufferChunks = 1000
203     CachedUpdates = False
204 tony 272 CaseSensitiveParameterNames = False
205 tony 210 EnableStatistics = False
206 tony 158 GenerateParamNames = False
207     GeneratorField.ApplyOnEvent = gaeOnNewRecord
208 tony 210 MasterDetailDelay = 0
209 tony 158 SQL.Strings = (
210     'Select count(*) as Mappings'
211     'From SEC$GLOBAL_AUTH_MAPPING A'
212     'Where SEC$MAP_NAME = ''AutoAdminImplementationMapping'''
213     )
214     Params = <>
215 tony 315 SQLFiltered = False
216 tony 158 DataSetCloseAction = dcDiscardChanges
217 tony 315 TZTextOption = tzOffset
218     DefaultTZDate = 43831
219     Left = 288
220     Top = 112
221 tony 158 end
222     object CharSetLookup: TIBQuery
223     AllowAutoActivateTransaction = False
224     Database = IBDatabase1
225     Transaction = CurrentTransaction
226     BufferChunks = 1000
227     CachedUpdates = False
228 tony 272 CaseSensitiveParameterNames = False
229 tony 210 EnableStatistics = False
230 tony 158 GenerateParamNames = False
231     GeneratorField.ApplyOnEvent = gaeOnNewRecord
232 tony 210 MasterDetailDelay = 0
233 tony 158 SQL.Strings = (
234     'Select trim(A.RDB$CHARACTER_SET_NAME) as RDB$CHARACTER_SET_NAME'
235     ' From'
236     'RDB$CHARACTER_SETS A order by 1'
237     ''
238     )
239     Params = <>
240 tony 315 SQLFiltered = False
241 tony 158 DataSetCloseAction = dcDiscardChanges
242 tony 315 TZTextOption = tzOffset
243     DefaultTZDate = 43831
244     Left = 160
245     Top = 104
246 tony 158 end
247     object DBSecFiles: TIBQuery
248     AllowAutoActivateTransaction = False
249     Database = IBDatabase1
250     Transaction = CurrentTransaction
251     BufferChunks = 1000
252     CachedUpdates = False
253 tony 272 CaseSensitiveParameterNames = False
254 tony 210 EnableStatistics = False
255 tony 158 GenerateParamNames = False
256     GeneratorField.ApplyOnEvent = gaeOnNewRecord
257 tony 210 MasterDetailDelay = 0
258 tony 158 SQL.Strings = (
259     'Select * From RDB$Files Where RDB$Shadow_Number is null or RDB$Shadow_Number = 0 '
260     'Order by RDB$FILE_SEQUENCE'
261     )
262     Params = <>
263 tony 315 SQLFiltered = False
264 tony 158 DataSetCloseAction = dcDiscardChanges
265 tony 315 TZTextOption = tzOffset
266     DefaultTZDate = 43831
267     Left = 32
268     Top = 104
269 tony 158 end
270     object UpdateCharSet: TIBUpdate
271     RefreshSQL.Strings = (
272     'Select Trim(A.RDB$CHARACTER_SET_NAME) as RDB$CHARACTER_SET_NAME'
273     ' From RDB$DATABASE A'
274     )
275     OnApplyUpdates = UpdateCharSetApplyUpdates
276 tony 315 Left = 424
277     Top = 104
278 tony 158 end
279     object IBDatabaseInfo: TIBDatabaseInfo
280     Database = IBDatabase1
281 tony 315 Left = 280
282     Top = 200
283 tony 158 end
284     object AttmtQuery: TIBQuery
285     AllowAutoActivateTransaction = False
286     Database = IBDatabase1
287     Transaction = CurrentTransaction
288     BufferChunks = 1000
289     CachedUpdates = False
290 tony 272 CaseSensitiveParameterNames = False
291 tony 210 EnableStatistics = False
292 tony 158 GenerateParamNames = False
293     GeneratorField.ApplyOnEvent = gaeOnNewRecord
294 tony 210 MasterDetailDelay = 0
295 tony 158 SQL.Strings = (
296     'Select * from MON$ATTACHMENTS'
297     'Where MON$ATTACHMENT_ID = CURRENT_CONNECTION'
298     )
299     Params = <>
300 tony 315 SQLFiltered = False
301 tony 158 DataSetCloseAction = dcDiscardChanges
302 tony 315 TZTextOption = tzOffset
303     DefaultTZDate = 43831
304     Left = 544
305     Top = 112
306 tony 158 end
307     object TableNameLookup: TIBQuery
308     AllowAutoActivateTransaction = False
309     Database = IBDatabase1
310     Transaction = CurrentTransaction
311     BufferChunks = 1000
312     CachedUpdates = False
313 tony 272 CaseSensitiveParameterNames = False
314 tony 210 EnableStatistics = False
315 tony 158 GenerateParamNames = False
316     GeneratorField.ApplyOnEvent = gaeOnNewRecord
317 tony 210 MasterDetailDelay = 0
318 tony 158 SQL.Strings = (
319     'SELECT r.RDB$RELATION_ID,'
320     ' trim(r.RDB$RELATION_NAME) as RDB$RELATION_NAME'
321     'FROM RDB$RELATIONS r'
322     )
323     Params = <>
324 tony 315 SQLFiltered = False
325 tony 158 DataSetCloseAction = dcDiscardChanges
326 tony 315 TZTextOption = tzOffset
327     DefaultTZDate = 43831
328     Left = 288
329     Top = 283
330 tony 158 end
331     object UserList: TIBQuery
332     AllowAutoActivateTransaction = False
333     Database = IBDatabase1
334     Transaction = CurrentTransaction
335     AfterInsert = UserListAfterInsert
336     AfterOpen = UserListAfterOpen
337     AfterPost = UserListAfterPost
338     AfterScroll = UserListAfterScroll
339     BeforeClose = UserListBeforeClose
340     BufferChunks = 1000
341     CachedUpdates = False
342 tony 272 CaseSensitiveParameterNames = False
343 tony 210 EnableStatistics = False
344 tony 158 GenerateParamNames = False
345     GeneratorField.ApplyOnEvent = gaeOnNewRecord
346 tony 210 MasterDetailDelay = 0
347 tony 158 SQL.Strings = (
348     'Select A.SEC$DESCRIPTION, A.SEC$PLUGIN, A.SEC$ADMIN,'
349 tony 209 'A.SEC$ACTIVE, Trim(A.SEC$USER_NAME) as SEC$USER_NAME, A.SEC$MIDDLE_NAME,'
350 tony 158 'A.SEC$FIRST_NAME, A.SEC$LAST_NAME,'
351 tony 209 'cast(NULL as VarChar(32)) as SEC$PASSWORD, CURRENT_CONNECTION,'
352 tony 158 'case when Count(B.MON$ATTACHMENT_ID) > 0 then true else false end as LoggedIn,'
353     'case When C.SEC$USER is not null then true else false end as DBCreator'
354     'From SEC$USERS A'
355     'Left Outer Join MON$ATTACHMENTS B'
356     'On A.SEC$USER_NAME = B.MON$USER'
357     'Left Outer Join SEC$DB_CREATORS C on C.SEC$USER = A.SEC$USER_NAME'
358     'Group By A.SEC$DESCRIPTION, A.SEC$PLUGIN, A.SEC$ADMIN,'
359     'A.SEC$ACTIVE, A.SEC$USER_NAME, A.SEC$MIDDLE_NAME,'
360     'A.SEC$FIRST_NAME, A.SEC$LAST_NAME, C.SEC$USER'
361     )
362     Params = <>
363     UpdateObject = UpdateUsers
364 tony 315 SQLFiltered = False
365 tony 158 DataSetCloseAction = dcSaveChanges
366 tony 315 TZTextOption = tzOffset
367     DefaultTZDate = 43831
368     Left = 416
369     Top = 352
370 tony 158 object UserListSECPLUGIN: TIBStringField
371     FieldKind = fkData
372     FieldName = 'SEC$PLUGIN'
373     Index = 0
374     LookupCache = False
375     ProviderFlags = [pfInUpdate, pfInWhere]
376     ReadOnly = True
377     Required = False
378     Size = 31
379     end
380     object UserListSECADMIN: TBooleanField
381     FieldKind = fkData
382     FieldName = 'SEC$ADMIN'
383     Index = 1
384     LookupCache = False
385     ProviderFlags = [pfInUpdate, pfInWhere]
386     ReadOnly = False
387     Required = False
388     DisplayValues = 'True;False'
389     end
390     object UserListSECACTIVE: TBooleanField
391     FieldKind = fkData
392     FieldName = 'SEC$ACTIVE'
393     Index = 2
394     LookupCache = False
395     ProviderFlags = [pfInUpdate, pfInWhere]
396     ReadOnly = False
397     Required = False
398     DisplayValues = 'True;False'
399     end
400     object UserListSECMIDDLE_NAME: TIBStringField
401     FieldKind = fkData
402     FieldName = 'SEC$MIDDLE_NAME'
403     Index = 3
404     LookupCache = False
405     ProviderFlags = [pfInUpdate, pfInWhere]
406     ReadOnly = False
407     Required = False
408     Size = 32
409     end
410     object UserListSECFIRST_NAME: TIBStringField
411     FieldKind = fkData
412     FieldName = 'SEC$FIRST_NAME'
413     Index = 4
414     LookupCache = False
415     ProviderFlags = [pfInUpdate, pfInWhere]
416     ReadOnly = False
417     Required = False
418     Size = 32
419     end
420     object UserListSECLAST_NAME: TIBStringField
421     FieldKind = fkData
422     FieldName = 'SEC$LAST_NAME'
423     Index = 5
424     LookupCache = False
425     ProviderFlags = [pfInUpdate, pfInWhere]
426     ReadOnly = False
427     Required = False
428     Size = 32
429     end
430     object UserListLOGGEDIN: TBooleanField
431     FieldKind = fkData
432     FieldName = 'LOGGEDIN'
433 tony 209 Index = 6
434 tony 158 LookupCache = False
435     ProviderFlags = [pfInUpdate, pfInWhere]
436     ReadOnly = False
437     Required = True
438     DisplayValues = 'True;False'
439     end
440     object UserListCURRENT_CONNECTION: TIBLargeIntField
441     FieldKind = fkData
442     FieldName = 'CURRENT_CONNECTION'
443 tony 209 Index = 7
444 tony 158 LookupCache = False
445     ProviderFlags = [pfInUpdate, pfInWhere]
446     ReadOnly = False
447     Required = True
448     end
449     object UserListDBCREATOR: TBooleanField
450     FieldKind = fkData
451     FieldName = 'DBCREATOR'
452 tony 209 Index = 8
453 tony 158 LookupCache = False
454     ProviderFlags = [pfInUpdate, pfInWhere]
455     ReadOnly = False
456     Required = True
457     DisplayValues = 'True;False'
458     end
459     object UserListUSERID: TLongintField
460     FieldKind = fkCalculated
461     FieldName = 'USERID'
462 tony 209 Index = 9
463 tony 158 LookupCache = False
464     ProviderFlags = [pfInUpdate, pfInWhere]
465     ReadOnly = False
466     Required = False
467     end
468     object UserListGROUPID: TLongintField
469     FieldKind = fkCalculated
470     FieldName = 'GROUPID'
471 tony 209 Index = 10
472     LookupCache = False
473     ProviderFlags = [pfInUpdate, pfInWhere]
474     ReadOnly = False
475     Required = False
476     end
477     object UserListSECPASSWORD: TIBStringField
478     FieldKind = fkData
479     FieldName = 'SEC$PASSWORD'
480     Index = 11
481     LookupCache = False
482     ProviderFlags = [pfInUpdate, pfInWhere]
483     ReadOnly = False
484     Required = False
485     Size = 32
486     end
487     object UserListSECUSER_NAME: TIBStringField
488     FieldKind = fkData
489     FieldName = 'SEC$USER_NAME'
490 tony 158 Index = 12
491     LookupCache = False
492     ProviderFlags = [pfInUpdate, pfInWhere]
493     ReadOnly = False
494     Required = False
495 tony 209 Size = 31
496 tony 158 end
497     end
498     object UpdateUsers: TIBUpdate
499     RefreshSQL.Strings = (
500     'Select A.SEC$DESCRIPTION, A.SEC$PLUGIN, A.SEC$ADMIN,'
501 tony 209 'A.SEC$ACTIVE, A.SEC$USER_NAME, A.SEC$MIDDLE_NAME,'
502 tony 158 'A.SEC$FIRST_NAME, A.SEC$LAST_NAME,'
503 tony 209 'cast(NULL as VarChar(32)) as SEC$PASSWORD, CURRENT_CONNECTION,'
504 tony 158 'case when B.MON$ATTACHMENT_ID is not null then true else false end as LoggedIn,'
505     'case When C.SEC$USER is not null then true else false end as DBCreator'
506     'From SEC$USERS A'
507     'Left Outer Join MON$ATTACHMENTS B'
508     'On A.SEC$USER_NAME = B.MON$USER'
509     'Left Outer Join SEC$DB_CREATORS C on C.SEC$USER = A.SEC$USER_NAME'
510 tony 209 'Where A.SEC$USER_NAME = :SEC$USER_NAME'
511 tony 158 )
512     OnApplyUpdates = UpdateUsersApplyUpdates
513 tony 315 Left = 544
514     Top = 360
515 tony 158 end
516     object RoleNameList: TIBQuery
517     AllowAutoActivateTransaction = False
518     Database = IBDatabase1
519     Transaction = CurrentTransaction
520     AutoCommit = acCommitRetaining
521     BufferChunks = 1000
522     CachedUpdates = False
523 tony 272 CaseSensitiveParameterNames = False
524 tony 158 DataSource = UserListSource
525 tony 210 EnableStatistics = False
526 tony 158 GenerateParamNames = False
527     GeneratorField.ApplyOnEvent = gaeOnNewRecord
528 tony 210 MasterDetailDelay = 0
529 tony 158 SQL.Strings = (
530     'SELECT r.RDB$ROLE_NAME, r.RDB$OWNER_NAME, r.RDB$DESCRIPTION, r.RDB$SYSTEM_FLAG, '
531 tony 209 'P.RDB$USER,RDB$PRIVILEGE, cast(:SEC$USER_NAME as VARCHAR(32)) as SEC$USER_NAME,'
532 tony 158 'Case When RDB$PRIVILEGE is null then 0 else 1 End as GRANTED'
533     'FROM RDB$ROLES r'
534     'Left Outer JOIN ('
535     'Select RDB$RELATION_NAME, RDB$PRIVILEGE, RDB$USER From RDB$USER_PRIVILEGES '
536 tony 209 'Where RDB$USER = :SEC$USER_NAME and RDB$PRIVILEGE = ''M'''
537 tony 158 ') P On P.RDB$RELATION_NAME = r.RDB$ROLE_NAME '
538     ''
539     )
540     Params = <
541     item
542     DataType = ftUnknown
543 tony 209 Name = 'SEC$USER_NAME'
544 tony 158 ParamType = ptInput
545     end>
546     UpdateObject = UpdateUserRoles
547 tony 315 SQLFiltered = False
548 tony 158 DataSetCloseAction = dcSaveChanges
549 tony 315 TZTextOption = tzOffset
550     DefaultTZDate = 43831
551     Left = 424
552     Top = 280
553 tony 158 ParamData = <
554     item
555     DataType = ftUnknown
556 tony 209 Name = 'SEC$USER_NAME'
557 tony 158 ParamType = ptInput
558     end>
559     end
560     object UpdateUserRoles: TIBUpdate
561     RefreshSQL.Strings = (
562     'SELECT r.RDB$ROLE_NAME, r.RDB$OWNER_NAME, r.RDB$DESCRIPTION, r.RDB$SYSTEM_FLAG,'
563 tony 209 'P.RDB$USER,RDB$PRIVILEGE, cast(:SEC$USER_NAME as VARCHAR(32)) as SEC$USER_NAME,'
564 tony 158 'Case When RDB$PRIVILEGE is null then 0 else 1 End as GRANTED'
565     'FROM RDB$ROLES r'
566     'Left Outer JOIN ('
567     'Select RDB$RELATION_NAME, RDB$PRIVILEGE, RDB$USER From RDB$USER_PRIVILEGES'
568 tony 209 'Where RDB$USER = :SEC$USER_NAME and RDB$PRIVILEGE = ''M'''
569 tony 158 ') P On P.RDB$RELATION_NAME = r.RDB$ROLE_NAME'
570     'Where r.RDB$ROLE_NAME = :RDB$ROLE_NAME'
571     )
572     OnApplyUpdates = UpdateUserRolesApplyUpdates
573 tony 315 Left = 544
574     Top = 288
575 tony 158 end
576     object ApplicationProperties1: TApplicationProperties
577     OnException = ApplicationProperties1Exception
578 tony 315 Left = 528
579     Top = 32
580 tony 158 end
581     object UserTags: TIBQuery
582     AllowAutoActivateTransaction = False
583     Database = IBDatabase1
584     Transaction = CurrentTransaction
585     AfterInsert = UserTagsAfterInsert
586     BufferChunks = 1000
587     CachedUpdates = False
588 tony 272 CaseSensitiveParameterNames = False
589 tony 158 DataSource = UserListSource
590 tony 210 EnableStatistics = False
591 tony 158 GenerateParamNames = False
592     GeneratorField.ApplyOnEvent = gaeOnNewRecord
593 tony 210 MasterDetailDelay = 0
594 tony 158 SQL.Strings = (
595     'Select a.SEC$USER_NAME, A.SEC$KEY, A.SEC$VALUE'
596     'From'
597     'SEC$USER_ATTRIBUTES A'
598 tony 209 'Where SEC$USER_NAME = :SEC$USER_NAME'
599 tony 158 )
600     Params = <
601     item
602     DataType = ftUnknown
603 tony 209 Name = 'SEC$USER_NAME'
604 tony 158 ParamType = ptInput
605     end>
606     UpdateObject = TagsUpdate
607 tony 315 SQLFiltered = False
608 tony 158 DataSetCloseAction = dcSaveChanges
609 tony 315 TZTextOption = tzOffset
610     DefaultTZDate = 43831
611     Left = 424
612     Top = 192
613 tony 158 ParamData = <
614     item
615     DataType = ftUnknown
616 tony 209 Name = 'SEC$USER_NAME'
617 tony 158 ParamType = ptInput
618     end>
619     end
620     object TagsUpdate: TIBUpdate
621     RefreshSQL.Strings = (
622     'Select A.SEC$USER_NAME, A.SEC$KEY, A.SEC$VALUE From '
623     'SEC$USER_ATTRIBUTES A'
624     'Where SEC$USER_NAME = :SEC$USER_NAME'
625     ' and A.SEC$KEY = :SEC$KEY'
626     )
627     OnApplyUpdates = TagsUpdateApplyUpdates
628 tony 315 Left = 536
629     Top = 200
630 tony 158 end
631     object UserListSource: TDataSource
632     DataSet = UserList
633 tony 315 Left = 304
634     Top = 360
635 tony 158 end
636     object Attachments: TIBQuery
637     AllowAutoActivateTransaction = False
638     Database = IBDatabase1
639     Transaction = CurrentTransaction
640     AfterDelete = AttachmentsAfterDelete
641     AfterOpen = AttachmentsAfterOpen
642     BeforeOpen = AttachmentsBeforeOpen
643     BufferChunks = 1000
644     CachedUpdates = False
645 tony 272 CaseSensitiveParameterNames = False
646 tony 210 EnableStatistics = False
647 tony 158 GenerateParamNames = False
648     GeneratorField.ApplyOnEvent = gaeOnNewRecord
649 tony 210 MasterDetailDelay = 0
650 tony 158 SQL.Strings = (
651     'SELECT *'
652     'FROM MON$ATTACHMENTS r'
653     'JOIN RDB$CHARACTER_SETS S On S.RDB$CHARACTER_SET_ID = r.MON$CHARACTER_SET_ID'
654     ''
655     )
656     Params = <>
657     UpdateObject = AttUpdate
658 tony 315 SQLFiltered = False
659 tony 158 DataSetCloseAction = dcDiscardChanges
660 tony 315 TZTextOption = tzOffset
661     DefaultTZDate = 43831
662     Left = 280
663     Top = 433
664 tony 158 object AttachmentsMONATTACHMENT_ID: TIBLargeIntField
665     FieldKind = fkData
666     FieldName = 'MON$ATTACHMENT_ID'
667     Index = 0
668     LookupCache = False
669     ProviderFlags = [pfInUpdate, pfInWhere]
670     ReadOnly = False
671     Required = False
672     end
673     object AttachmentsMONSERVER_PID: TIBIntegerField
674     FieldKind = fkData
675     FieldName = 'MON$SERVER_PID'
676     Index = 1
677     LookupCache = False
678     ProviderFlags = [pfInUpdate, pfInWhere]
679     ReadOnly = False
680     Required = False
681     end
682     object AttachmentsMONSTATE: TIBSmallintField
683     FieldKind = fkData
684     FieldName = 'MON$STATE'
685     Index = 2
686     LookupCache = False
687     ProviderFlags = [pfInUpdate, pfInWhere]
688     ReadOnly = False
689     Required = False
690     end
691     object AttachmentsMONATTACHMENT_NAME: TIBStringField
692     FieldKind = fkData
693     FieldName = 'MON$ATTACHMENT_NAME'
694     Index = 3
695     LookupCache = False
696     ProviderFlags = [pfInUpdate, pfInWhere]
697     ReadOnly = False
698     Required = False
699     Size = 255
700     end
701     object AttachmentsMONUSER: TIBStringField
702     FieldKind = fkData
703     FieldName = 'MON$USER'
704     Index = 4
705     LookupCache = False
706     ProviderFlags = [pfInUpdate, pfInWhere]
707     ReadOnly = False
708     Required = False
709     Size = 31
710     end
711     object AttachmentsMONROLE: TIBStringField
712     FieldKind = fkData
713     FieldName = 'MON$ROLE'
714     Index = 5
715     LookupCache = False
716     ProviderFlags = [pfInUpdate, pfInWhere]
717     ReadOnly = False
718     Required = False
719     Size = 31
720     end
721     object AttachmentsMONREMOTE_PROTOCOL: TIBStringField
722     FieldKind = fkData
723     FieldName = 'MON$REMOTE_PROTOCOL'
724     Index = 6
725     LookupCache = False
726     ProviderFlags = [pfInUpdate, pfInWhere]
727     ReadOnly = False
728     Required = False
729     Size = 10
730     end
731     object AttachmentsMONREMOTE_ADDRESS: TIBStringField
732     FieldKind = fkData
733     FieldName = 'MON$REMOTE_ADDRESS'
734     Index = 7
735     LookupCache = False
736     ProviderFlags = [pfInUpdate, pfInWhere]
737     ReadOnly = False
738     Required = False
739     Size = 255
740     end
741     object AttachmentsMONREMOTE_PID: TIBIntegerField
742     FieldKind = fkData
743     FieldName = 'MON$REMOTE_PID'
744     Index = 8
745     LookupCache = False
746     ProviderFlags = [pfInUpdate, pfInWhere]
747     ReadOnly = False
748     Required = False
749     end
750     object AttachmentsMONCHARACTER_SET_ID: TIBSmallintField
751     FieldKind = fkData
752     FieldName = 'MON$CHARACTER_SET_ID'
753     Index = 9
754     LookupCache = False
755     ProviderFlags = [pfInUpdate, pfInWhere]
756     ReadOnly = False
757     Required = False
758     end
759     object AttachmentsMONTIMESTAMP: TDateTimeField
760     FieldKind = fkData
761     FieldName = 'MON$TIMESTAMP'
762     Index = 10
763     LookupCache = False
764     ProviderFlags = [pfInUpdate, pfInWhere]
765     ReadOnly = False
766     Required = False
767     end
768     object AttachmentsMONGARBAGE_COLLECTION: TIBSmallintField
769     FieldKind = fkData
770     FieldName = 'MON$GARBAGE_COLLECTION'
771     Index = 11
772     LookupCache = False
773     ProviderFlags = [pfInUpdate, pfInWhere]
774     ReadOnly = False
775     Required = False
776     end
777     object AttachmentsMONREMOTE_PROCESS: TIBStringField
778     FieldKind = fkData
779     FieldName = 'MON$REMOTE_PROCESS'
780     Index = 12
781     LookupCache = False
782     ProviderFlags = [pfInUpdate, pfInWhere]
783     ReadOnly = False
784     Required = False
785     Size = 255
786     end
787     object AttachmentsMONSTAT_ID: TIBIntegerField
788     FieldKind = fkData
789     FieldName = 'MON$STAT_ID'
790     Index = 13
791     LookupCache = False
792     ProviderFlags = [pfInUpdate, pfInWhere]
793     ReadOnly = False
794     Required = False
795     end
796     object AttachmentsMONCLIENT_VERSION: TIBStringField
797     FieldKind = fkData
798     FieldName = 'MON$CLIENT_VERSION'
799     Index = 14
800     LookupCache = False
801     ProviderFlags = [pfInUpdate, pfInWhere]
802     ReadOnly = False
803     Required = False
804     Size = 255
805     end
806     object AttachmentsMONREMOTE_VERSION: TIBStringField
807     FieldKind = fkData
808     FieldName = 'MON$REMOTE_VERSION'
809     Index = 15
810     LookupCache = False
811     ProviderFlags = [pfInUpdate, pfInWhere]
812     ReadOnly = False
813     Required = False
814     Size = 255
815     end
816     object AttachmentsMONREMOTE_HOST: TIBStringField
817     FieldKind = fkData
818     FieldName = 'MON$REMOTE_HOST'
819     Index = 16
820     LookupCache = False
821     ProviderFlags = [pfInUpdate, pfInWhere]
822     ReadOnly = False
823     Required = False
824     Size = 255
825     end
826     object AttachmentsMONREMOTE_OS_USER: TIBStringField
827     FieldKind = fkData
828     FieldName = 'MON$REMOTE_OS_USER'
829     Index = 17
830     LookupCache = False
831     ProviderFlags = [pfInUpdate, pfInWhere]
832     ReadOnly = False
833     Required = False
834     Size = 255
835     end
836     object AttachmentsMONAUTH_METHOD: TIBStringField
837     FieldKind = fkData
838     FieldName = 'MON$AUTH_METHOD'
839     Index = 18
840     LookupCache = False
841     ProviderFlags = [pfInUpdate, pfInWhere]
842     ReadOnly = False
843     Required = False
844     Size = 255
845     end
846     object AttachmentsMONSYSTEM_FLAG: TIBSmallintField
847     FieldKind = fkData
848     FieldName = 'MON$SYSTEM_FLAG'
849     Index = 19
850     LookupCache = False
851     ProviderFlags = [pfInUpdate, pfInWhere]
852     ReadOnly = False
853     Required = True
854     end
855     object AttachmentsRDBCHARACTER_SET_NAME: TIBStringField
856     FieldKind = fkData
857     FieldName = 'RDB$CHARACTER_SET_NAME'
858     Index = 20
859     LookupCache = False
860     ProviderFlags = [pfInUpdate, pfInWhere]
861     ReadOnly = False
862     Required = False
863     Size = 31
864     end
865     object AttachmentsRDBFORM_OF_USE: TIBStringField
866     FieldKind = fkData
867     FieldName = 'RDB$FORM_OF_USE'
868     Index = 21
869     LookupCache = False
870     ProviderFlags = [pfInUpdate, pfInWhere]
871     ReadOnly = False
872     Required = False
873     Size = 31
874     end
875     object AttachmentsRDBNUMBER_OF_CHARACTERS: TIBIntegerField
876     FieldKind = fkData
877     FieldName = 'RDB$NUMBER_OF_CHARACTERS'
878     Index = 22
879     LookupCache = False
880     ProviderFlags = [pfInUpdate, pfInWhere]
881     ReadOnly = False
882     Required = False
883     end
884     object AttachmentsRDBDEFAULT_COLLATE_NAME: TIBStringField
885     FieldKind = fkData
886     FieldName = 'RDB$DEFAULT_COLLATE_NAME'
887     Index = 23
888     LookupCache = False
889     ProviderFlags = [pfInUpdate, pfInWhere]
890     ReadOnly = False
891     Required = False
892     Size = 31
893     end
894     object AttachmentsRDBCHARACTER_SET_ID: TIBSmallintField
895     FieldKind = fkData
896     FieldName = 'RDB$CHARACTER_SET_ID'
897     Index = 24
898     LookupCache = False
899     ProviderFlags = [pfInUpdate, pfInWhere]
900     ReadOnly = False
901     Required = False
902     end
903     object AttachmentsRDBSYSTEM_FLAG: TIBSmallintField
904     FieldKind = fkData
905     FieldName = 'RDB$SYSTEM_FLAG'
906     Index = 25
907     LookupCache = False
908     ProviderFlags = [pfInUpdate, pfInWhere]
909     ReadOnly = False
910     Required = True
911     end
912     object AttachmentsRDBDESCRIPTION: TIBMemoField
913     FieldKind = fkData
914     FieldName = 'RDB$DESCRIPTION'
915     Index = 26
916     LookupCache = False
917     ProviderFlags = [pfInUpdate, pfInWhere]
918     ReadOnly = False
919     Required = False
920     BlobType = ftMemo
921     Size = 8
922     Transliterate = False
923     DisplayTextAsClassName = False
924     end
925     object AttachmentsRDBFUNCTION_NAME: TIBStringField
926     FieldKind = fkData
927     FieldName = 'RDB$FUNCTION_NAME'
928     Index = 27
929     LookupCache = False
930     ProviderFlags = [pfInUpdate, pfInWhere]
931     ReadOnly = False
932     Required = False
933     Size = 31
934     end
935     object AttachmentsRDBBYTES_PER_CHARACTER: TIBSmallintField
936     FieldKind = fkData
937     FieldName = 'RDB$BYTES_PER_CHARACTER'
938     Index = 28
939     LookupCache = False
940     ProviderFlags = [pfInUpdate, pfInWhere]
941     ReadOnly = False
942     Required = False
943     end
944     object AttachmentsRDBSECURITY_CLASS: TIBStringField
945     FieldKind = fkData
946     FieldName = 'RDB$SECURITY_CLASS'
947     Index = 29
948     LookupCache = False
949     ProviderFlags = [pfInUpdate, pfInWhere]
950     ReadOnly = False
951     Required = False
952     Size = 31
953     end
954     object AttachmentsRDBOWNER_NAME: TIBStringField
955     FieldKind = fkData
956     FieldName = 'RDB$OWNER_NAME'
957     Index = 30
958     LookupCache = False
959     ProviderFlags = [pfInUpdate, pfInWhere]
960     ReadOnly = False
961     Required = False
962     Size = 31
963     end
964     end
965     object AttUpdate: TIBUpdate
966     OnApplyUpdates = AttUpdateApplyUpdates
967 tony 315 Left = 376
968     Top = 432
969 tony 158 end
970     object AdminUserQuery: TIBSQL
971     Database = IBDatabase1
972 tony 272 CaseSensitiveParameterNames = False
973 tony 158 GenerateParamNames = False
974     UniqueParamNames = False
975     ParamCheck = True
976     SQL.Strings = (
977     'Select A.SEC$ADMIN From SEC$USERS A'
978     'Where SEC$USER_NAME = CURRENT_USER'
979     )
980 tony 359 Scrollable = False
981 tony 158 Transaction = CurrentTransaction
982 tony 315 Left = 424
983     Top = 496
984 tony 158 end
985     object DBTables: TIBQuery
986     AllowAutoActivateTransaction = False
987     Database = IBDatabase1
988     Transaction = CurrentTransaction
989     BufferChunks = 1000
990     CachedUpdates = False
991 tony 272 CaseSensitiveParameterNames = False
992 tony 210 EnableStatistics = False
993 tony 158 GenerateParamNames = False
994     GeneratorField.ApplyOnEvent = gaeOnNewRecord
995 tony 210 MasterDetailDelay = 0
996 tony 158 SQL.Strings = (
997     'Select Trim(A.RDB$RELATION_NAME) as RDB$RELATION_NAME, 1 as Selected'
998     ' From RDB$RELATIONS A'
999     ' Where RDB$SYSTEM_FLAG = 0'
1000     ' order by 1'
1001     )
1002     Params = <>
1003     UpdateObject = DBTablesUpdate
1004 tony 315 SQLFiltered = False
1005 tony 158 DataSetCloseAction = dcDiscardChanges
1006 tony 315 TZTextOption = tzOffset
1007     DefaultTZDate = 43831
1008     Left = 520
1009     Top = 488
1010 tony 158 end
1011     object DBTablesUpdate: TIBUpdate
1012     RefreshSQL.Strings = (
1013     ''
1014     )
1015     OnApplyUpdates = DBTablesUpdateApplyUpdates
1016 tony 315 Left = 592
1017     Top = 480
1018 tony 158 end
1019     object AuthMappings: TIBQuery
1020     AllowAutoActivateTransaction = False
1021     Database = IBDatabase1
1022     Transaction = CurrentTransaction
1023     BufferChunks = 1000
1024     CachedUpdates = False
1025 tony 272 CaseSensitiveParameterNames = False
1026 tony 210 EnableStatistics = False
1027 tony 158 GenerateParamNames = False
1028     GeneratorField.ApplyOnEvent = gaeOnNewRecord
1029 tony 210 MasterDetailDelay = 0
1030 tony 158 SQL.Strings = (
1031     'SELECT r.RDB$DB_KEY, cast(''Local'' as VarChar(6)) as MAPTYPE, r.RDB$MAP_NAME,'
1032     ' Case'
1033     ' When r.RDB$MAP_USING = ''P'' and r.RDB$MAP_PLUGIN is not null then cast (''Plugin '' || r.RDB$MAP_PLUGIN as VarChar(20))'
1034     ' When r.RDB$MAP_USING = ''P'' and r.RDB$MAP_PLUGIN is null then ''Any Plugin'''
1035     ' When r.RDB$MAP_USING = ''S'' then ''Any Plugin Serverwide'''
1036     ' When r.RDB$MAP_USING = ''M'' then ''Mapping'''
1037     ' When r.RDB$MAP_USING = ''*'' then ''*'''
1038     ' else'
1039     ' ''Using '' || r.RDB$MAP_USING || '','' || coalesce(r.RDB$MAP_PLUGIN,'''') End as MAP_USING,'
1040     ' r.RDB$MAP_USING, r.RDB$MAP_PLUGIN,'
1041     ' r.RDB$MAP_DB, r.RDB$MAP_FROM_TYPE, r.RDB$MAP_FROM,'
1042     ' Trim(r.RDB$MAP_FROM_TYPE) || '': '' || Trim(r.RDB$MAP_FROM) as MAP_FROM,'
1043     ' r.RDB$MAP_TO_TYPE,'
1044     ' T.RDB$TYPE_NAME as MAP_TO_TYPE, r.RDB$MAP_TO,'
1045     ' Trim(T.RDB$TYPE_NAME) || '': '' || Trim(r.RDB$MAP_TO) as MAP_TO,'
1046     ' r.RDB$SYSTEM_FLAG, r.RDB$DESCRIPTION'
1047     'FROM RDB$AUTH_MAPPING r'
1048     'JOIN RDB$TYPES T On T.RDB$TYPE = r.RDB$MAP_TO_TYPE and T.RDB$FIELD_NAME = ''RDB$MAP_TO_TYPE'''
1049     'UNION'
1050     'SELECT r.RDB$DB_KEY, ''Global'', r.SEC$MAP_NAME,'
1051     ' Case'
1052     ' When r.SEC$MAP_USING = ''P'' and r.SEC$MAP_PLUGIN is not null then cast (''Plugin '' || r.SEC$MAP_PLUGIN as VarChar(20))'
1053     ' When r.SEC$MAP_USING = ''P'' and r.SEC$MAP_PLUGIN is null then ''Any Plugin'''
1054     ' When r.SEC$MAP_USING = ''S'' then ''Any Plugin Serverwide'''
1055     ' When r.SEC$MAP_USING = ''M'' then ''Mapping'''
1056     ' When r.SEC$MAP_USING = ''*'' then ''*'''
1057     ' else'
1058     ' ''Using '' || r.SEC$MAP_USING || '','' || coalesce(r.SEC$MAP_PLUGIN,'''') End as MAP_USING,'
1059     ' r.SEC$MAP_USING, r.SEC$MAP_PLUGIN,'
1060     ' r.SEC$MAP_DB, r.SEC$MAP_FROM_TYPE, r.SEC$MAP_FROM,'
1061     ' Trim(r.SEC$MAP_FROM_TYPE) || '': '' || Trim(r.SEC$MAP_FROM) as MAP_FROM,'
1062     ' r.SEC$MAP_TO_TYPE,'
1063     ' T.RDB$TYPE_NAME as MAP_TO_TYPE,r.SEC$MAP_TO,'
1064     ' Trim(T.RDB$TYPE_NAME) || '': '' || Trim(r.SEC$MAP_TO) as MAP_TO,'
1065     ' null,null'
1066     'FROM SEC$GLOBAL_AUTH_MAPPING r'
1067     'JOIN RDB$TYPES T On T.RDB$TYPE = r.SEC$MAP_TO_TYPE and T.RDB$FIELD_NAME = ''RDB$MAP_TO_TYPE'''
1068     ''
1069     )
1070     Params = <>
1071 tony 315 SQLFiltered = False
1072 tony 158 DataSetCloseAction = dcDiscardChanges
1073 tony 315 TZTextOption = tzOffset
1074     DefaultTZDate = 43831
1075     Left = 657
1076     Top = 118
1077 tony 158 end
1078     object AccessRights: TIBQuery
1079     AllowAutoActivateTransaction = False
1080     Database = IBDatabase1
1081     Transaction = CurrentTransaction
1082     OnCalcFields = AccessRightsCalcFields
1083     BufferChunks = 1000
1084     CachedUpdates = False
1085 tony 272 CaseSensitiveParameterNames = False
1086 tony 210 EnableStatistics = False
1087 tony 158 GenerateParamNames = False
1088     GeneratorField.ApplyOnEvent = gaeOnNewRecord
1089 tony 210 MasterDetailDelay = 0
1090 tony 158 SQL.Strings = (
1091     'with recursive AccessRight as ('
1092     'Select UP.RDB$USER as SUBJECT_NAME,'
1093     ' UP.RDB$USER_TYPE as SUBJECT_TYPE,'
1094     ' UP.RDB$OBJECT_TYPE as OBJECT_TYPE,'
1095     ' UP.RDB$RELATION_NAME as OBJECT_NAME,'
1096     ' T2.RDB$TYPE_NAME as OBJECT_TYPE_NAME,'
1097     ' UP.RDB$GRANTOR as GRANTOR,'
1098     ' UP.RDB$GRANT_OPTION as GRANT_OPTION,'
1099     ' List(Trim(UP.RDB$PRIVILEGE)) as Granted_Privileges,'
1100     ' count (C.RDB$DB_KEY) as ChildCount'
1101     ' From RDB$USER_PRIVILEGES UP'
1102     ' JOIN RDB$TYPES T2 On T2.RDB$TYPE = UP.RDB$OBJECT_TYPE and T2.RDB$FIELD_NAME = ''RDB$OBJECT_TYPE'''
1103     ' Left Outer JOIN RDB$USER_PRIVILEGES C On C.RDB$USER_TYPE = UP.RDB$OBJECT_TYPE and C.RDB$USER = UP.RDB$RELATION_NAME'
1104     ' Where UP.RDB$USER <> ''SYSDBA'''
1105     ' Group BY UP.RDB$USER,UP.RDB$USER_TYPE,UP.RDB$OBJECT_TYPE,'
1106     ' UP.RDB$RELATION_NAME, UP.RDB$GRANTOR, UP.RDB$GRANT_OPTION,'
1107     ' T2.RDB$TYPE_NAME'
1108     ' ),'
1109     ''
1110     ' AccessRights as ('
1111     ' select cast(Trim(SUBJECT_NAME) || SUBJECT_TYPE as Char(33)) as ID,SUBJECT_TYPE, SUBJECT_NAME,'
1112     ' OBJECT_TYPE, OBJECT_NAME, OBJECT_TYPE_NAME, Granted_Privileges,GRANTOR, GRANT_OPTION,'
1113     ' cast(NULL as Char(33) ) as Parent, ChildCount'
1114     ' From AccessRight'
1115     ' UNION all'
1116     ' Select Trim(B.SUBJECT_NAME) || B.SUBJECT_TYPE as ID, B.SUBJECT_TYPE, B.SUBJECT_NAME,'
1117     ' B.OBJECT_TYPE, B.OBJECT_NAME, B.OBJECT_TYPE_NAME, B.Granted_Privileges, B.GRANTOR, B.GRANT_OPTION,'
1118     ' A.ID as Parent,B.ChildCount'
1119     ' From AccessRight B'
1120     ' JOIN AccessRights A On A.OBJECT_TYPE = B.SUBJECT_TYPE and A.OBJECT_NAME = B.SUBJECT_NAME'
1121     ' )'
1122     ''
1123     'Select *'
1124     'From ('
1125     'Select A.ID as ID, Trim(A.SUBJECT_NAME )as SUBJECT_NAME, A.SUBJECT_TYPE as SUBJECT_TYPE,'
1126     ' case When A.Parent is NULL then Trim(T.RDB$TYPE_NAME) || A.SUBJECT_TYPE Else A.Parent End as Parent,'
1127 tony 315 ' cast (sum(A.ChildCount) as Integer) as ChildCount'
1128 tony 158 ' from AccessRights A'
1129     ' JOIN RDB$TYPES T On T.RDB$TYPE = A.SUBJECT_TYPE and RDB$FIELD_NAME = ''RDB$OBJECT_TYPE'''
1130     ' Group By A.ID, A.SUBJECT_NAME, A.SUBJECT_TYPE, A.Parent, T.RDB$TYPE_NAME'
1131     'UNION'
1132     'SELECT Trim(r.RDB$TYPE_NAME) || r.RDB$TYPE as ID, Trim(r.RDB$TYPE_NAME) || ''S'' as SUBJECT_NAME,-r.RDB$TYPE,'
1133     ' NULL,1'
1134     'FROM RDB$TYPES r Where RDB$FIELD_NAME = ''RDB$OBJECT_TYPE'''
1135     'and Exists(Select * from RDB$USER_PRIVILEGES Where RDB$USER_TYPE = r.RDB$TYPE)'
1136     ''
1137     ' )'
1138     ''
1139     )
1140     Params = <>
1141 tony 315 SQLFiltered = False
1142 tony 158 DataSetCloseAction = dcDiscardChanges
1143 tony 315 TZTextOption = tzOffset
1144     DefaultTZDate = 43831
1145     Left = 648
1146     Top = 264
1147 tony 158 object AccessRightsID: TIBStringField
1148     FieldKind = fkData
1149     FieldName = 'ID'
1150     Index = 0
1151     LookupCache = False
1152     ProviderFlags = [pfInUpdate, pfInWhere]
1153     ReadOnly = False
1154     Required = False
1155     Size = 37
1156     end
1157     object AccessRightsSUBJECT_NAME: TIBStringField
1158     FieldKind = fkData
1159     FieldName = 'SUBJECT_NAME'
1160     Index = 1
1161     LookupCache = False
1162     ProviderFlags = [pfInUpdate, pfInWhere]
1163     ReadOnly = False
1164     Required = False
1165     Size = 32
1166     end
1167     object AccessRightsSUBJECT_TYPE: TIBSmallintField
1168     FieldKind = fkData
1169     FieldName = 'SUBJECT_TYPE'
1170     Index = 2
1171     LookupCache = False
1172     ProviderFlags = [pfInUpdate, pfInWhere]
1173     ReadOnly = False
1174     Required = False
1175     end
1176     object AccessRightsPARENT: TIBStringField
1177     FieldKind = fkData
1178     FieldName = 'PARENT'
1179     Index = 3
1180     LookupCache = False
1181     ProviderFlags = [pfInUpdate, pfInWhere]
1182     ReadOnly = False
1183     Required = False
1184     Size = 37
1185     end
1186 tony 315 object AccessRightsImageIndex: TLongintField
1187     FieldKind = fkCalculated
1188     FieldName = 'ImageIndex'
1189 tony 158 Index = 4
1190     LookupCache = False
1191     ProviderFlags = [pfInUpdate, pfInWhere]
1192     ReadOnly = False
1193     Required = False
1194     end
1195 tony 315 object AccessRightsDisplayName: TStringField
1196 tony 158 FieldKind = fkCalculated
1197 tony 315 FieldName = 'DisplayName'
1198 tony 158 Index = 5
1199     LookupCache = False
1200     ProviderFlags = [pfInUpdate, pfInWhere]
1201     ReadOnly = False
1202     Required = False
1203 tony 315 Size = 64
1204 tony 158 end
1205 tony 315 object AccessRightsCHILDCOUNT: TIBIntegerField
1206     FieldKind = fkData
1207     FieldName = 'CHILDCOUNT'
1208 tony 158 Index = 6
1209     LookupCache = False
1210     ProviderFlags = [pfInUpdate, pfInWhere]
1211     ReadOnly = False
1212     Required = False
1213     end
1214     end
1215     object SubjectAccessRights: TIBQuery
1216     AllowAutoActivateTransaction = False
1217     Database = IBDatabase1
1218     Transaction = CurrentTransaction
1219     BeforeOpen = SubjectAccessRightsBeforeOpen
1220     BufferChunks = 1000
1221     CachedUpdates = False
1222 tony 272 CaseSensitiveParameterNames = False
1223 tony 210 EnableStatistics = False
1224 tony 158 GenerateParamNames = False
1225     GeneratorField.ApplyOnEvent = gaeOnNewRecord
1226 tony 210 MasterDetailDelay = 0
1227 tony 158 SQL.Strings = (
1228     'Select UP.RDB$USER as SUBJECT_NAME,'
1229     ' UP.RDB$USER_TYPE as SUBJECT_TYPE,'
1230     ' T1.RDB$TYPE_NAME as SUBJECT_TYPE_NAME,'
1231     ' UP.RDB$OBJECT_TYPE as OBJECT_TYPE,'
1232     ' case T2.RDB$TYPE_NAME'
1233     ' When ''RELATION'' then ''TABLE'''
1234     ' When ''FIELD'' then ''DOMAIN'''
1235     ' Else T2.RDB$TYPE_NAME End as OBJECT_TYPE_NAME,'
1236     ' UP.RDB$RELATION_NAME as OBJECT_NAME,'
1237     ' List(DISTINCT Trim(RDB$PRIVILEGE)) as Granted_Privileges,'
1238     ' UC.Update_Columns,'
1239     ' RC.Reference_Columns,'
1240     ' UP.RDB$GRANTOR as GrantedBy,'
1241     ' coalesce(UP.RDB$GRANT_OPTION,0) as GRANT_OPTION'
1242     ' From RDB$USER_PRIVILEGES UP'
1243     ' JOIN RDB$TYPES T1 On T1.RDB$TYPE = UP.RDB$USER_TYPE and T1.RDB$FIELD_NAME = ''RDB$OBJECT_TYPE'''
1244     ' JOIN RDB$TYPES T2 On T2.RDB$TYPE = UP.RDB$OBJECT_TYPE and T2.RDB$FIELD_NAME = ''RDB$OBJECT_TYPE'''
1245     ' Left Outer JOIN ('
1246     ' Select RDB$USER, RDB$USER_TYPE, RDB$OBJECT_TYPE, RDB$RELATION_NAME,'
1247     ' List(Trim(RDB$FIELD_NAME)) as Update_Columns'
1248     ' From RDB$USER_PRIVILEGES Where RDB$PRIVILEGE = ''U'''
1249     ' Group By RDB$USER, RDB$USER_TYPE, RDB$OBJECT_TYPE, RDB$RELATION_NAME) UC'
1250     ' On UC.RDB$USER = UP.RDB$USER and UC.RDB$USER_TYPE = UP.RDB$USER_TYPE and'
1251     ' UC.RDB$OBJECT_TYPE = UP.RDB$OBJECT_TYPE and UC.RDB$RELATION_NAME = UP.RDB$RELATION_NAME'
1252     ' Left Outer JOIN ('
1253     ' Select RDB$USER, RDB$USER_TYPE, RDB$OBJECT_TYPE, RDB$RELATION_NAME,'
1254     ' List(Trim(RDB$FIELD_NAME)) as Reference_Columns'
1255     ' From RDB$USER_PRIVILEGES Where RDB$PRIVILEGE = ''R'''
1256     ' Group By RDB$USER, RDB$USER_TYPE, RDB$OBJECT_TYPE, RDB$RELATION_NAME) RC'
1257     ' On RC.RDB$USER = UP.RDB$USER and RC.RDB$USER_TYPE = UP.RDB$USER_TYPE and'
1258     ' RC.RDB$OBJECT_TYPE = UP.RDB$OBJECT_TYPE and RC.RDB$RELATION_NAME = UP.RDB$RELATION_NAME'
1259     ' Where Trim(UP.RDB$USER) || UP.RDB$USER_TYPE = :ID and'
1260     ' (not (UP.RDB$OBJECT_TYPE in (0,9,13)) or'
1261     ' (UP.RDB$OBJECT_TYPE in (0,13) and'
1262     ' not Exists(Select * from RDB$RELATIONS Where RDB$RELATION_NAME = UP.RDB$RELATION_NAME and RDB$SYSTEM_FLAG <> 0)) or'
1263     ' (UP.RDB$OBJECT_TYPE = 9 and UP.RDB$RELATION_NAME not Similar to ''RDB$%|SEC$%|MON$%|SQL$%'')'
1264     ' )'
1265     ' Group BY UP.RDB$USER,UP.RDB$USER_TYPE,UP.RDB$OBJECT_TYPE,'
1266     ' UP.RDB$RELATION_NAME, UP.RDB$GRANTOR, RDB$GRANT_OPTION,T1.RDB$TYPE_NAME,'
1267     ' T2.RDB$TYPE_NAME, UC.Update_Columns, RC.Reference_Columns'
1268     ''
1269     )
1270     Params = <
1271     item
1272     DataType = ftUnknown
1273     Name = 'ID'
1274     ParamType = ptInput
1275     end>
1276 tony 315 SQLFiltered = False
1277 tony 158 DataSetCloseAction = dcDiscardChanges
1278 tony 315 TZTextOption = tzOffset
1279     DefaultTZDate = 43831
1280     Left = 648
1281     Top = 336
1282 tony 158 ParamData = <
1283     item
1284     DataType = ftUnknown
1285     Name = 'ID'
1286     ParamType = ptInput
1287     end>
1288     end
1289 tony 209 object IBXServicesConnection1: TIBXServicesConnection
1290     Connected = False
1291 tony 272 AfterConnect = IBXServicesConnection1AfterConnect
1292 tony 209 OnLogin = IBXServicesConnection1Login
1293     Params.Strings = (
1294     'sql_role_name=RDB$ADMIN'
1295     )
1296     TraceFlags = []
1297 tony 315 Left = 640
1298     Top = 48
1299 tony 209 end
1300     object IBStatisticalService1: TIBXStatisticalService
1301     ServicesConnection = IBXServicesConnection1
1302     TraceFlags = []
1303     Options = [HeaderPages]
1304 tony 315 Left = 48
1305     Top = 287
1306 tony 209 end
1307     object IBConfigService1: TIBXConfigService
1308     ServicesConnection = IBXServicesConnection1
1309     TraceFlags = []
1310 tony 315 Left = 168
1311     Top = 283
1312 tony 209 end
1313     object IBServerProperties1: TIBXServerProperties
1314     ServicesConnection = IBXServicesConnection1
1315     TraceFlags = []
1316 tony 315 Left = 40
1317     Top = 365
1318 tony 209 end
1319     object IBLogService1: TIBXLogService
1320     ServicesConnection = IBXServicesConnection1
1321     TraceFlags = []
1322 tony 315 Left = 168
1323     Top = 365
1324 tony 209 end
1325     object IBSecurityService1: TIBXSecurityService
1326     ServicesConnection = IBXServicesConnection1
1327     TraceFlags = []
1328     UserID = 0
1329     GroupID = 0
1330     AdminRole = False
1331 tony 315 Left = 36
1332     Top = 437
1333 tony 209 end
1334     object IBValidationService1: TIBXValidationService
1335     ServicesConnection = IBXServicesConnection1
1336     TraceFlags = []
1337     OnGetNextLine = IBValidationService1GetNextLine
1338     Options = [ValidateFull]
1339 tony 315 Left = 632
1340     Top = 416
1341 tony 209 end
1342     object IBOnlineValidationService1: TIBXOnlineValidationService
1343     ServicesConnection = IBXServicesConnection1
1344     TraceFlags = []
1345     OnGetNextLine = IBValidationService1GetNextLine
1346 tony 315 Left = 40
1347     Top = 503
1348 tony 209 end
1349     object LegacyUserList: TIBXServicesUserList
1350     FieldDefs = <
1351     item
1352     Name = 'UserID'
1353     DataType = ftInteger
1354     Precision = -1
1355     end
1356     item
1357     Name = 'GroupID'
1358     DataType = ftInteger
1359     Precision = -1
1360     end
1361     item
1362     Name = 'SEC$USER_NAME'
1363     DataType = ftString
1364     Precision = -1
1365     Size = 31
1366     end
1367     item
1368     Name = 'SEC$FIRST_NAME'
1369     DataType = ftString
1370     Precision = -1
1371     Size = 32
1372     end
1373     item
1374     Name = 'SEC$MIDDLE_NAME'
1375     DataType = ftString
1376     Precision = -1
1377     Size = 32
1378     end
1379     item
1380     Name = 'SEC$LAST_NAME'
1381     DataType = ftString
1382     Precision = -1
1383     Size = 32
1384     end
1385     item
1386     Name = 'SEC$PASSWORD'
1387     DataType = ftString
1388     Precision = -1
1389     Size = 32
1390     end
1391     item
1392     Name = 'SEC$ADMIN'
1393     DataType = ftBoolean
1394     Precision = -1
1395     end
1396     item
1397     Name = 'SEC$PLUGIN'
1398     DataType = ftString
1399     Size = 21
1400     end
1401     item
1402     Name = 'SEC$ACTIVE'
1403     DataType = ftBoolean
1404     end
1405     item
1406     Name = 'LOGGEDIN'
1407     DataType = ftBoolean
1408     end
1409     item
1410     Name = 'DBCREATOR'
1411     DataType = ftBoolean
1412     end>
1413     AfterOpen = LegacyUserListAfterOpen
1414     BeforeClose = LegacyUserListBeforeClose
1415     AfterInsert = UserListAfterInsert
1416 tony 210 AfterPost = LegacyUserListAfterPost
1417 tony 209 Source = IBSecurityService1
1418 tony 315 Left = 167
1419     Top = 438
1420 tony 209 end
1421     object InLimboList: TIBXServicesLimboTransactionsList
1422     FieldDefs = <
1423     item
1424     Name = 'TransactionID'
1425     DataType = ftInteger
1426     Precision = -1
1427     end
1428     item
1429     Name = 'TransactionType'
1430     DataType = ftString
1431     Precision = -1
1432     Size = 16
1433     end
1434     item
1435     Name = 'HostSite'
1436     DataType = ftString
1437     Precision = -1
1438     Size = 256
1439     end
1440     item
1441     Name = 'RemoteSite'
1442     DataType = ftString
1443     Precision = -1
1444     Size = 256
1445     end
1446     item
1447     Name = 'DatabasePath'
1448     DataType = ftString
1449     Precision = -1
1450     Size = 256
1451     end
1452     item
1453     Name = 'State'
1454     DataType = ftString
1455     Precision = -1
1456     Size = 32
1457     end
1458     item
1459     Name = 'RecommendedAction'
1460     DataType = ftString
1461     Precision = -1
1462     Size = 32
1463     end
1464     item
1465     Name = 'RequestedAction'
1466     DataType = ftString
1467     Precision = -1
1468     Size = 32
1469     end>
1470     Source = IBLimboTrans
1471 tony 315 Left = 296
1472     Top = 496
1473 tony 209 end
1474     object IBLimboTrans: TIBXLimboTransactionResolutionService
1475     ServicesConnection = IBXServicesConnection1
1476     TraceFlags = []
1477     GlobalAction = CommitGlobal
1478 tony 315 Left = 176
1479     Top = 496
1480 tony 209 end
1481 tony 272 object ConfigDataset: TMemDataset
1482     FieldDefs = <
1483     item
1484     Name = 'ParamDescription'
1485     DataType = ftString
1486     Size = 256
1487     end
1488     item
1489     Name = 'ParamValue'
1490     DataType = ftInteger
1491     end>
1492     AfterClose = ConfigDatasetAfterClose
1493 tony 315 Left = 528
1494     Top = 424
1495 tony 272 end
1496 tony 158 end