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