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