ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/examples/DBAdmin/DataModule.lfm
Revision: 231
Committed: Mon Apr 16 08:32:21 2018 UTC (6 years ago) by tony
File size: 43163 byte(s)
Log Message:
Fixes merged

File Contents

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