ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/branches/journaling/design/IBDBReg.pas
(Generate patch)

Comparing ibx/trunk/design/IBDBReg.pas (file contents):
Revision 7 by tony, Sun Aug 5 18:28:19 2012 UTC vs.
Revision 47 by tony, Mon Jan 9 15:31:51 2017 UTC

# Line 39 | Line 39 | unit IBDBReg;
39   *)
40   {$A+}                           (* Aligned records: On *)
41   {$B-}                           (* Short circuit boolean expressions: Off *)
42 {$G+}                           (* Imported data: On *)
42   {$H+}                           (* Huge Strings: On *)
43   {$J-}                           (* Modification of Typed Constants: Off *)
44   {$M+}                           (* Generate run-time type information: On *)
# Line 47 | Line 46 | unit IBDBReg;
46   {$Q-}                           (* Overflow checks: Off *)
47   {$R-}                           (* Range checks: Off *)
48   {$T+}                           (* Typed address: On *)
50 {$U+}                           (* Pentim-safe FDIVs: On *)
49   {$W-}                           (* Always generate stack frames: Off *)
50   {$X+}                           (* Extended syntax: On *)
51   {$Z1}                           (* Minimum Enumeration Size: 1 Byte *)
52  
53   interface
54  
55 < uses {Windows,} SysUtils, Classes, Graphics, Dialogs, Controls, Forms, TypInfo,
55 > uses SysUtils, Classes, Graphics, Dialogs, Controls, Forms, TypInfo,
56       DB, IBTable, IBDatabase,  IBEventsEditor,  LazarusPackageIntf,
57 <      IBUpdateSQL, IBXConst, ComponentEditors, PropEdits, DBPropEdits, FieldsEditor;
57 >      IBUpdateSQL, ComponentEditors, PropEdits, DBPropEdits, FieldsEditor,
58 >     dbFieldLinkPropEditor, dbFieldListPropEditor, IBDialogs;
59  
60   type
61  
# Line 92 | Line 91 | type
91      procedure GetValues(Proc: TGetStrProc); override;
92    end;
93  
94 +  { TDBStringProperty }
95 +
96    TDBStringProperty = class(TStringProperty)
97 +  private
98 +    function ConnecttoDB: boolean;
99    public
100      function GetAttributes: TPropertyAttributes; override;
101      procedure GetValueList(List: TStrings); virtual;
102      procedure GetValues(Proc: TGetStrProc); override;
103 +    procedure Edit; override;
104    end;
105  
106 +  { TIBIndexFieldNamesProperty }
107 +
108    TIBIndexFieldNamesProperty = class(TDBStringProperty)
109    public
110      procedure GetValueList(List: TStrings); override;
# Line 126 | Line 132 | type
132      function GetVerbCount: Integer; override;
133    end;
134  
135 +  { TIBArrayGridEditor }
136 +
137 +  TIBArrayGridEditor = class(TComponentEditor)
138 +  public
139 +    procedure ExecuteVerb(Index: Integer); override;
140 +    function GetVerb(Index: Integer): string; override;
141 +    function GetVerbCount: Integer; override;
142 +  end;
143 +
144   { TIBQueryEditor }
145  
146    TIBQueryEditor = class(TFieldsComponentEditor)
# Line 184 | Line 199 | type
199    public
200      procedure Edit; override;
201    end;
202 < (*
202 >
203 >  { TIBTableFieldLinkProperty }
204 >
205    TIBTableFieldLinkProperty = class(TFieldLinkProperty)
206    private
207      FTable: TIBTable;
208    protected
209 +    function GetIndexDefs: TIndexDefs; override;
210      function GetIndexFieldNames: string; override;
211      function GetMasterFields: string; override;
212      procedure SetIndexFieldNames(const Value: string); override;
# Line 196 | Line 214 | type
214    public
215      procedure Edit; override;
216    end;
217 < *)
217 >
218   { TSQLPropertyEditor }
219  
220    TSQLPropertyEditor = class(TStringsPropertyEditor)
# Line 314 | Line 332 | type
332      procedure Edit; override;
333    end;
334  
335 +  { TDBDynamicGridFieldProperty }
336 +
337 +  TDBDynamicGridFieldProperty = class(TFieldProperty)
338 +  public
339 +    procedure FillValues(const Values: TStringList); override;
340 +  end;
341 +
342 +  { TDBLookupPropertiesGridFieldProperty }
343 +
344 +  TDBLookupPropertiesGridFieldProperty = class(TFieldProperty)
345 +  public
346 +    procedure FillValues(const Values: TStringList); override;
347 +  end;
348 +
349 +  { TIBTreeViewFieldProperty }
350 +
351 +  TIBTreeViewFieldProperty = class(TFieldProperty)
352 +  public
353 +    procedure FillValues(const Values: TStringList); override;
354 +  end;
355 +
356 +  { TIBDynamicGridIndexNamesProperty }
357 +
358 +  TIBDynamicGridIndexNamesProperty = class(TIndexFieldNamesProperty)
359 +  protected
360 +    function GetFieldDefs: TFieldDefs; override;
361 +    function GetIndexFieldNames: string; override;
362 +    procedure SetIndexFieldNames(const Value: string); override;
363 +  end;
364 +
365 +  { TIBFieldDefsProperty }
366 +
367 +  TIBFieldDefsProperty = class(TCollectionPropertyEditor)
368 +  public
369 +    procedure Edit; override;
370 +  end;
371 +
372 +  { TIBIndexDefsProperty }
373 +
374 +  TIBIndexDefsProperty = class(TCollectionPropertyEditor)
375 +  public
376 +    procedure Edit; override;
377 +  end;
378 +
379 +
380   procedure Register;
381  
382   implementation
383  
384 < uses IB, IBQuery, IBStoredProc, IBCustomDataSet,
385 <     IBIntf, IBSQL, IBSQLMonitor, IBDatabaseInfo, IBEvents,
384 > uses IB, IBQuery, IBStoredProc, IBCustomDataSet, FBMessages,
385 >     IBSQL, IBSQLMonitor, IBDatabaseInfo, IBEvents, IBTypes,
386       IBServices, IBDatabaseEdit, IBTransactionEdit,
387 <     IBBatchMove, DBLoginDlg, IBExtract,LResources, IBSelectSQLEditor,
387 >     IBBatchMove, IBExtract,LResources, IBSelectSQLEditor,
388       IBModifySQLEditor,IBDeleteSQLEditor,IBRefreshSQLEditor,
389       IBInsertSQLEditor, IBGeneratorEditor, IBUpdateSQLEditor, IBDataSetEditor,
390 <     IBSQLEditor, ibserviceeditor;
391 <
392 <
390 >     IBSQLEditor, ibserviceeditor, LCLVersion, IBDynamicGrid, IBLookupComboEditBox,
391 >     IBTreeView, DBControlGrid, ibxscript, IBLocalDBSupport, IBDSDialogs,
392 >     IBArrayGrid, IBVersion, IBDataOutput;
393 >
394 > const
395 >  IBPalette1 = 'Firebird'; {do not localize}
396 >  IBPalette2 = 'Firebird Admin'; {do not localize}
397 >  IBPalette3 = 'Firebird Data Controls';   {do not localize}
398 >  
399 > resourcestring
400 >   SInterbaseExpressVersion = 'Firebird Express for Lazarus ' + IBX_VERSION;
401 >   SEditSQL = 'Edit SQL';
402 >   SIBSQLEditor = 'IBSQL Editor';
403 >   SIBServiceEditor = 'Edit IB Service';
404 >   SIBUpdateSQLEditor = '&UpdateSQL Editor...';
405 >   SIBDataSetEditor = '&Dataset Editor...';
406 >   SExecute = 'E&xecute';
407 >   SIBDatabaseEditor = 'Da&tabase Editor...';
408 >   SIBTransactionEditor = '&Transaction Editor...';
409 >   SIBUpdateLayout = 'Update Layout';
410  
411   procedure Register;
412   begin
413 <  if not TryIBLoad then Exit;
413 >  if not TryIBLoad then
414 >  begin
415 >    MessageDlg('IBX is unable to locate the Firebird Library - have you remembered to install it?',mtError,[mbOK],0);
416 >    Exit;
417 >  end;
418  
419 <  RegisterNoIcon([TIBStringField, TIBBCDField]);
419 >  RegisterNoIcon([TIBStringField, TIBBCDField, TIBMemoField, TIBArrayField]);
420 >  {$if lcl_fullversion < 01010000}
421 >  {see http://bugs.freepascal.org/view.php?id=19035 }
422    RegisterNoIcon([TIntegerField]);
423 +  {$endif}
424    RegisterComponents(IBPalette1, [ TIBQuery, TIBDataSet,
425     TIBDatabase, TIBTransaction, TIBUpdateSQL, TIBEvents,
426       TIBSQL, TIBDatabaseInfo, TIBSQLMonitor,
427 <       TIBStoredProc,TIBBatchMove,  TIBTable,TIBExtract]);
428 <  if IBServiceAPIPresent  then
427 >       TIBStoredProc,TIBBatchMove,  TIBTable,TIBExtract, TIBXScript, TIBLocalDBSupport,
428 >       TIBBlockFormatOut,TIBCSVDataOut,TIBInsertStmtsOut]);
429 >  if FirebirdAPI.HasServiceAPI  then
430      RegisterComponents(IBPalette2, [TIBConfigService, TIBBackupService,
431        TIBRestoreService, TIBValidationService, TIBStatisticalService,
432        TIBLogService, TIBSecurityService, TIBServerProperties]);
433 +
434 +
435 +  RegisterComponents(IBPalette3,[TIBLookupComboEditBox,TIBDynamicGrid,TIBTreeView,TDBControlGrid, TIBArrayGrid]);
436    RegisterPropertyEditor(TypeInfo(TIBFileName), TIBDatabase, 'DatabaseName', TIBFileNameProperty); {do not localize}
437    RegisterPropertyEditor(TypeInfo(string), TIBStoredProc, 'StoredProcName', TIBStoredProcNameProperty); {do not localize}
438    RegisterPropertyEditor(TypeInfo(TParams), TIBStoredProc, 'Params', TIBStoredProcParamsProperty);
439    RegisterPropertyEditor(TypeInfo(string), TIBTable, 'TableName', TIBTableNameProperty); {do not localize}
440    RegisterPropertyEditor(TypeInfo(string), TIBTable, 'IndexName', TIBIndexNameProperty); {do not localize}
441    RegisterPropertyEditor(TypeInfo(string), TIBTable, 'IndexFieldNames', TIBIndexFieldNamesProperty); {do not localize}
442 < //  RegisterPropertyEditor(TypeInfo(string), TIBTable, 'MasterFields', TIBTableFieldLinkProperty); {do not localize}
442 >  RegisterPropertyEditor(TypeInfo(string), TIBTable, 'MasterFields', TIBTableFieldLinkProperty); {do not localize}
443 >  RegisterPropertyEditor(TypeInfo(TFieldDefs), TIBTable, 'FieldDefs', TIBFieldDefsProperty); {do not localize}
444 >  RegisterPropertyEditor(TypeInfo(TIndexDefs), TIBTable, 'IndexDefs', TIBIndexDefsProperty); {do not localize}
445    RegisterPropertyEditor(TypeInfo(TStrings), TIBQuery, 'SQL', TIBQuerySQLProperty); {do not localize}
446    RegisterPropertyEditor(TypeInfo(TStrings), TIBDataSet, 'SelectSQL', TIBDatasetSQLProperty); {do not localize}
447    RegisterPropertyEditor(TypeInfo(TStrings), TIBDataSet, 'ModifySQL', TIBUpdateSQLProperty); {do not localize}
# Line 372 | Line 465 | begin
465    RegisterComponentEditor(TIBStoredProc, TIBStoredProcEditor);
466    RegisterComponentEditor(TIBSQL, TIBSQLEditor);
467    RegisterComponentEditor(TIBCustomService, TIBServiceEditor);
468 +  RegisterComponentEditor(TIBArrayGrid, TIBArrayGridEditor);
469 +
470 +
471 +  {Firebird Data Access Controls}
472 +  RegisterPropertyEditor(TypeInfo(string), TDBLookupProperties, 'KeyField', TDBDynamicGridFieldProperty);
473 +  RegisterPropertyEditor(TypeInfo(string), TDBLookupProperties, 'ListField', TDBDynamicGridFieldProperty);
474 +  RegisterPropertyEditor(TypeInfo(string), TIBDynamicGrid, 'IndexFieldNames', TIBDynamicGridIndexNamesProperty);
475 +  RegisterPropertyEditor(TypeInfo(string), TDBLookupProperties, 'DataFieldName', TDBLookupPropertiesGridFieldProperty);
476 +  RegisterPropertyEditor(TypeInfo(string), TIBTreeView, 'KeyField', TIBTreeViewFieldProperty);
477 +  RegisterPropertyEditor(TypeInfo(string), TIBTreeView, 'TextField', TIBTreeViewFieldProperty);
478 +  RegisterPropertyEditor(TypeInfo(string), TIBTreeView, 'ParentField', TIBTreeViewFieldProperty);
479 +  RegisterPropertyEditor(TypeInfo(string), TIBTreeView, 'HasChildField', TIBTreeViewFieldProperty);
480 +
481 +  IBGUIInterface :=  TIBDSLCLInterface.Create;
482 + end;
483 +
484 + procedure LoadDataSourceFields(DataSource: TDataSource; List: TStrings);
485 + var
486 +  DataSet: TDataSet;
487 +  i: Integer;
488 + begin
489 +  if Assigned(DataSource) then
490 +  begin
491 +    DataSet := DataSource.DataSet;
492 +    if Assigned(DataSet) then
493 +    begin
494 +      if DataSet.Fields.Count > 0 then
495 +        DataSet.GetFieldNames(List)
496 +      else
497 +      begin
498 +        DataSet.FieldDefs.Update;
499 +        for i := 0 to DataSet.FieldDefs.Count - 1 do
500 +          List.Add(DataSet.FieldDefs[i].Name);
501 +      end;
502 +    end;
503 +  end;
504 + end;
505 +
506 + { TIBIndexDefsProperty }
507 +
508 + procedure TIBIndexDefsProperty.Edit;
509 + var IndexDefs: TIndexDefs;
510 + begin
511 +  IndexDefs := TIndexDefs(GetObjectValue);
512 +  if IndexDefs <> nil then
513 +    IndexDefs.Update;
514 +  inherited Edit;
515 + end;
516 +
517 + { TIBFieldDefsProperty }
518 +
519 + procedure TIBFieldDefsProperty.Edit;
520 + var FieldDefs: TFieldDefs;
521 + begin
522 +  FieldDefs := TFieldDefs(GetObjectValue);
523 +  if FieldDefs <> nil then
524 +    FieldDefs.Update;
525 +  inherited Edit;
526 + end;
527 +
528 + { TIBArrayGridEditor }
529 +
530 + procedure TIBArrayGridEditor.ExecuteVerb(Index: Integer);
531 + begin
532 +  if Index < inherited GetVerbCount then
533 +    inherited ExecuteVerb(Index)
534 +  else
535 +  case Index of
536 +    0: TIBArrayGrid(Component).UpdateLayout;
537 +  end;
538 + end;
539 +
540 + function TIBArrayGridEditor.GetVerb(Index: Integer): string;
541 + begin
542 +  if Index < inherited GetVerbCount then
543 +    Result := inherited GetVerb(Index) else
544 +  begin
545 +    Dec(Index, inherited GetVerbCount);
546 +    case Index of
547 +      0: Result := SIBUpdateLayout;
548 +      1 : Result := SInterbaseExpressVersion ;
549 +    end;
550 +  end;
551 + end;
552 +
553 + function TIBArrayGridEditor.GetVerbCount: Integer;
554 + begin
555 +  Result := 2;
556 + end;
557 +
558 + { TDBLookupPropertiesGridFieldProperty }
559 +
560 + procedure TDBLookupPropertiesGridFieldProperty.FillValues(
561 +  const Values: TStringList);
562 + var
563 +  P: TDBLookupProperties;
564 + begin
565 +  P :=TDBLookupProperties(GetComponent(0));
566 +  if not (P is TDBLookupProperties) then exit;
567 +  LoadDataSourceFields(TIBDynamicGrid(P.Owner.Grid).DataSource, Values);
568 + end;
569 +
570 + { TIBTreeViewFieldProperty }
571 +
572 + procedure TIBTreeViewFieldProperty.FillValues(const Values: TStringList);
573 + var ListSource: TDataSource;
574 + begin
575 +  ListSource :=  TIBTreeView(GetComponent(0)).DataSource;
576 +  LoadDataSourceFields(ListSource, Values);
577 + end;
578 +
579 + { TIBDynamicGridIndexNamesProperty }
580 +
581 + function TIBDynamicGridIndexNamesProperty.GetFieldDefs: TFieldDefs;
582 + var Grid: TIBDynamicGrid;
583 + begin
584 +  Result := nil;
585 +  Grid := TIBDynamicGrid(GetComponent(0));
586 +  if assigned(Grid.DataSource) and assigned(Grid.DataSource.DataSet) then
587 +     Result := Grid.DataSource.DataSet.FieldDefs
588 + end;
589 +
590 + function TIBDynamicGridIndexNamesProperty.GetIndexFieldNames: string;
591 + var Grid: TIBDynamicGrid;
592 + begin
593 +  Grid := TIBDynamicGrid(GetComponent(0));
594 +  Result := Grid.IndexFieldNames
595 + end;
596 +
597 + procedure TIBDynamicGridIndexNamesProperty.SetIndexFieldNames(
598 +  const Value: string);
599 + var Grid: TIBDynamicGrid;
600 + begin
601 +  Grid := TIBDynamicGrid(GetComponent(0));
602 +  Grid.IndexFieldNames := Value
603 + end;
604 +
605 + { TDBDynamicGridFieldProperty }
606 +
607 + procedure TDBDynamicGridFieldProperty.FillValues(const Values: TStringList);
608 + var
609 +  P: TDBLookupProperties;
610 + begin
611 +  P :=TDBLookupProperties(GetComponent(0));
612 +  if not (P is TDBLookupProperties) then exit;
613 +  LoadDataSourceFields(P.ListSource, Values);
614   end;
615  
616   { TIBServiceEditor }
# Line 456 | Line 695 | end;
695  
696   procedure TIBTableNameProperty.GetValues(Proc: TGetStrProc);
697   var
698 <   TableName : TIBTable;
698 >   Table : TIBTable;
699     i : integer;
700   begin
701 <  TableName := GetComponent(0) as TIBTable;
702 <  with TableName do
701 >  Table := GetComponent(0) as TIBTable;
702 >   if Table.Database = nil then
703 >      Exit;
704 >  with Table do
705      for I := 0 to TableNames.Count - 1 do
706        Proc (TableNames[i]);
707   end;
708  
709   { TDBStringProperty }
710  
711 + function TDBStringProperty.ConnecttoDB: boolean;
712 + var DataSet: TIBCustomDataSet;
713 + begin
714 +  Result := false;
715 +  DataSet := (GetComponent(0) as TIBCustomDataSet);
716 +  if assigned(Dataset.Database) then
717 +  begin
718 +    try
719 +      DataSet.Database.Connected := true;
720 +    except on E: Exception do
721 +      ShowMessage(E.Message)
722 +    end;
723 +    Result := DataSet.Database.Connected
724 +  end;
725 + end;
726 +
727   function TDBStringProperty.GetAttributes: TPropertyAttributes;
728   begin
729    Result := [paValueList, paSortList, paMultiSelect];
# Line 481 | Line 738 | var
738    I: Integer;
739    Values: TStringList;
740   begin
741 +  if not ConnecttoDB then Exit;
742    Values := TStringList.Create;
743    try
744      GetValueList(Values);
# Line 490 | Line 748 | begin
748    end;
749   end;
750  
751 + procedure TDBStringProperty.Edit;
752 + begin
753 +  if ConnecttoDB then
754 +    inherited Edit;
755 + end;
756 +
757   { Utility Functions }
758  
759   function GetPropertyValue(Instance: TPersistent; const PropName: string): TPersistent;
# Line 551 | Line 815 | var
815    Query: TIBQuery;
816   begin
817    Query := GetComponent(0) as TIBQuery;
818 <  if IBSelectSQLEditor.EditSQL(Query.Database,Query.SQL) then Modified;
818 >  if IBSelectSQLEditor.EditSQL(Query,Query.SQL) then Modified;
819   end;
820  
821   { TIBDatasetSQLProperty }
# Line 561 | Line 825 | var
825    IBDataset: TIBDataset;
826   begin
827    IBDataset := GetComponent(0) as TIBDataset;
828 <  if IBSelectSQLEditor.EditSQL(IBDataSet.Database,IBDataSet.SelectSQL) then Modified;
828 >  if IBSelectSQLEditor.EditSQL(IBDataSet,IBDataSet.SelectSQL) then Modified;
829   end;
830  
831   { TIBSQLProperty }
# Line 571 | Line 835 | var
835    IBSQL: TIBSQL;
836   begin
837    IBSQL := GetComponent(0) as TIBSQL;
838 <  if IBSelectSQLEditor.EditSQL(IBSQL.Database,IBSQL.SQL) then Modified;
838 >  if IBSQLEditor.EditIBSQL(IBSQL) then Modified;
839   end;
840  
841   { TIBUpdateSQLEditor }
# Line 585 | Line 849 | function TIBUpdateSQLEditor.GetVerb(Inde
849   begin
850    case Index of
851      0 : Result := SIBUpdateSQLEditor;
852 <    1: Result := SInterbaseExpressVersion;
852 >    1: Result := SInterbaseExpressVersion ;
853    end;
854   end;
855  
# Line 597 | Line 861 | end;
861   { TIBDataSetEditor }
862  
863   procedure TIBDataSetEditor.ExecuteVerb(Index: Integer);
600 var
601  IBDataset: TIBDataset;
864   begin
865    if Index < inherited GetVerbCount then
866      inherited ExecuteVerb(Index) else
# Line 622 | Line 884 | begin
884      case Index of
885        0: Result := SIBDataSetEditor;
886        1: Result := SExecute;
887 <      2: Result := SInterbaseExpressVersion;
887 >      2: Result := SInterbaseExpressVersion ;
888      end;
889    end;
890   end;
# Line 679 | Line 941 | begin
941      Dec(Index, inherited GetVerbCount);
942      case Index of
943        0: Result := SIBDatabaseEditor;
944 <      1 : Result := SInterbaseExpressVersion;
944 >      1 : Result := SInterbaseExpressVersion ;
945      end;
946    end;
947   end;
# Line 702 | Line 964 | function TIBTransactionEditor.GetVerb(In
964   begin
965    case Index of
966      0: Result := SIBTransactionEditor;
967 <    1: Result := SInterbaseExpressVersion;
967 >    1: Result := SInterbaseExpressVersion ;
968    end;
969   end;
970  
# Line 724 | Line 986 | begin
986      Dec(Index, inherited GetVerbCount);
987      case Index of
988        0: Query.ExecSQL;
989 <      1: if ibselectsqleditor.EditSQL(Query.Database,Query.SQL) then Designer.Modified;
989 >      1: if ibselectsqleditor.EditSQL(Query,Query.SQL) then Designer.Modified;
990      end;
991    end;
992   end;
# Line 738 | Line 1000 | begin
1000      case Index of
1001        0: Result := SExecute;
1002        1: Result := SEditSQL;
1003 <      2: Result := SInterbaseExpressVersion;
1003 >      2: Result := SInterbaseExpressVersion ;
1004      end;
1005    end;
1006   end;
# Line 768 | Line 1030 | begin
1030      Dec(Index, inherited GetVerbCount);
1031      case Index of
1032        0: Result := SExecute;
1033 <      1: Result := SInterbaseExpressVersion;
1033 >      1: Result := SInterbaseExpressVersion ;
1034      end;
1035    end;
1036   end;
# Line 794 | Line 1056 | begin
1056    end;
1057    inherited Edit;
1058   end;
1059 < (*
1059 >
1060   { TIBTableFieldLinkProperty }
1061  
1062   procedure TIBTableFieldLinkProperty.Edit;
1063   begin
1064    FTable := DataSet as TIBTable;
1065 +  if assigned(FTable.Database) then
1066 +    FTable.Database.Connected := true;
1067    inherited Edit;
1068   end;
1069  
1070 + function TIBTableFieldLinkProperty.GetIndexDefs: TIndexDefs;
1071 + begin
1072 +  Result :=  FTable.IndexDefs
1073 + end;
1074 +
1075   function TIBTableFieldLinkProperty.GetIndexFieldNames: string;
1076   begin
1077    Result := FTable.IndexFieldNames;
# Line 821 | Line 1090 | end;
1090   procedure TIBTableFieldLinkProperty.SetMasterFields(const Value: string);
1091   begin
1092    FTable.MasterFields := Value;
1093 < end;*)
1093 > end;
1094  
1095   { TIBUpdateSQLProperty }
1096  
# Line 830 | Line 1099 | var
1099    IBDataset: TIBDataset;
1100   begin
1101    IBDataset := GetComponent(0) as TIBDataset;
1102 <  if IBModifySQLEditor.EditSQL(IBDataSet.Database,IBDataSet.ModifySQL) then Modified;
1102 >  if IBModifySQLEditor.EditSQL(IBDataSet,IBDataSet.ModifySQL) then Modified;
1103   end;
1104  
1105   { TIBUpdateSQLUpdateProperty }
# Line 838 | Line 1107 | end;
1107   procedure TIBUpdateSQLUpdateProperty.Edit;
1108   begin
1109    GetObjects;
1110 <  if IBModifySQLEditor.EditSQL(FDatabase,FIBUpdateSQL.ModifySQL) then Modified;
1110 >  if IBModifySQLEditor.EditSQL(FIBUpdateSQL.DataSet,FIBUpdateSQL.ModifySQL) then Modified;
1111   end;
1112  
1113   { TIBRefreshSQLProperty }
# Line 846 | Line 1115 | end;
1115   procedure TIBRefreshSQLProperty.Edit;
1116   var
1117    IBDataset: TIBDataset;
849  aDatabase: TIBDatabase;
1118   begin
1119    IBDataset := GetComponent(0) as TIBDataset;
1120 <  if IBRefreshSQLEditor.EditSQL(IBDataSet.Database,IBDataSet.RefreshSQL) then Modified;
1120 >  if IBRefreshSQLEditor.EditSQL(IBDataSet,IBDataSet.RefreshSQL) then Modified;
1121   end;
1122  
1123   { TIBUpdateSQLRefreshSQLProperty }
# Line 857 | Line 1125 | end;
1125   procedure TIBUpdateSQLRefreshSQLProperty.Edit;
1126   begin
1127    GetObjects;
1128 <  if IBRefreshSQLEditor.EditSQL(FDatabase,FIBUpdateSQL.RefreshSQL) then Modified;
1128 >  if IBRefreshSQLEditor.EditSQL(FIBUpdateSQL.DataSet,FIBUpdateSQL.RefreshSQL) then Modified;
1129   end;
1130  
1131   { TIBDeleteSQLProperty }
1132  
1133   procedure TIBDeleteSQLProperty.Edit;
1134   var
1135 <  IBDataset: TIBDataset;
1135 >  IBDataset: TIBDataSet;
1136   begin
1137 <  IBDataset := GetComponent(0) as TIBDataset;
1138 <  if IBDeleteSQLEditor.EditSQL(IBDataSet.Database,IBDataSet.DeleteSQL) then Modified;
1137 >  IBDataset := GetComponent(0) as TIBDataSet;
1138 >  if IBDeleteSQLEditor.EditSQL(IBDataSet,IBDataSet.DeleteSQL) then Modified;
1139   end;
1140  
1141   { TIBUpdateSQLDeleteProperty }
# Line 880 | Line 1148 | end;
1148   procedure TIBUpdateSQLDeleteProperty.Edit;
1149   begin
1150    GetObjects;
1151 <  if IBDeleteSQLEditor.EditSQL(FDatabase,FIBUpdateSQL.DeleteSQL) then Modified;
1151 >  if IBDeleteSQLEditor.EditSQL(FIBUpdateSQL.DataSet,FIBUpdateSQL.DeleteSQL) then Modified;
1152   end;
1153  
1154   { TUpdateSQLPropertyEditor }
# Line 903 | Line 1171 | end;
1171  
1172   procedure TIBInsertSQLProperty.Edit;
1173   var
1174 <  IBDataset: TIBDataset;
1174 >  IBDataset: TIBDataSet;
1175   begin
1176 <  IBDataset := GetComponent(0) as TIBDataset;
1177 <  if IBInsertSQLEditor.EditSQL(IBDataSet.Database,IBDataSet.InsertSQL) then Modified;
1176 >  IBDataset := GetComponent(0) as TIBDataSet;
1177 >  if IBInsertSQLEditor.EditSQL(IBDataSet,IBDataSet.InsertSQL) then Modified;
1178   end;
1179  
1180   { TIBUpdateSQLInsertSQLProperty }
# Line 914 | Line 1182 | end;
1182   procedure TIBUpdateSQLInsertSQLProperty.Edit;
1183   begin
1184    GetObjects;
1185 <  if IBInsertSQLEditor.EditSQL(FDatabase,FIBUpdateSQL.InsertSQL) then Modified;
1185 >  if IBInsertSQLEditor.EditSQL(FIBUpdateSQL.Dataset,FIBUpdateSQL.InsertSQL) then Modified;
1186   end;
1187  
1188   { TIBGeneratorProperty }
# Line 940 | Line 1208 | function TIBSQLEditor.GetVerb(Index: Int
1208   begin
1209    case Index of
1210      0 : Result := SIBSQLEditor;
1211 <    1: Result := SInterbaseExpressVersion;
1211 >    1: Result := SInterbaseExpressVersion ;
1212    end;
1213   end;
1214  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines