You've already forked lazarus-ccr
RxFPC:add demo for sorting data in IBX dataset
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6155 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
Binary file not shown.
After Width: | Height: | Size: 134 KiB |
@ -0,0 +1,89 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<CONFIG>
|
||||||
|
<ProjectOptions>
|
||||||
|
<Version Value="11"/>
|
||||||
|
<General>
|
||||||
|
<SessionStorage Value="InProjectDir"/>
|
||||||
|
<MainUnit Value="0"/>
|
||||||
|
<Title Value="project1"/>
|
||||||
|
<Scaled Value="True"/>
|
||||||
|
<ResourceType Value="res"/>
|
||||||
|
<UseXPManifest Value="True"/>
|
||||||
|
<XPManifest>
|
||||||
|
<DpiAware Value="True"/>
|
||||||
|
</XPManifest>
|
||||||
|
<Icon Value="0"/>
|
||||||
|
</General>
|
||||||
|
<BuildModes Count="1">
|
||||||
|
<Item1 Name="Default" Default="True"/>
|
||||||
|
</BuildModes>
|
||||||
|
<PublishOptions>
|
||||||
|
<Version Value="2"/>
|
||||||
|
</PublishOptions>
|
||||||
|
<RunParams>
|
||||||
|
<FormatVersion Value="2"/>
|
||||||
|
<Modes Count="0"/>
|
||||||
|
</RunParams>
|
||||||
|
<RequiredPackages Count="5">
|
||||||
|
<Item1>
|
||||||
|
<PackageName Value="rx_sort_ibx"/>
|
||||||
|
</Item1>
|
||||||
|
<Item2>
|
||||||
|
<PackageName Value="FCL"/>
|
||||||
|
</Item2>
|
||||||
|
<Item3>
|
||||||
|
<PackageName Value="rxnew"/>
|
||||||
|
</Item3>
|
||||||
|
<Item4>
|
||||||
|
<PackageName Value="ibexpress"/>
|
||||||
|
</Item4>
|
||||||
|
<Item5>
|
||||||
|
<PackageName Value="LCL"/>
|
||||||
|
</Item5>
|
||||||
|
</RequiredPackages>
|
||||||
|
<Units Count="2">
|
||||||
|
<Unit0>
|
||||||
|
<Filename Value="project1.lpr"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
</Unit0>
|
||||||
|
<Unit1>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<ComponentName Value="Form1"/>
|
||||||
|
<HasResources Value="True"/>
|
||||||
|
<ResourceBaseClass Value="Form"/>
|
||||||
|
<UnitName Value="Unit1"/>
|
||||||
|
</Unit1>
|
||||||
|
</Units>
|
||||||
|
</ProjectOptions>
|
||||||
|
<CompilerOptions>
|
||||||
|
<Version Value="11"/>
|
||||||
|
<Target>
|
||||||
|
<Filename Value="project1"/>
|
||||||
|
</Target>
|
||||||
|
<SearchPaths>
|
||||||
|
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||||
|
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||||
|
</SearchPaths>
|
||||||
|
<Linking>
|
||||||
|
<Options>
|
||||||
|
<Win32>
|
||||||
|
<GraphicApplication Value="True"/>
|
||||||
|
</Win32>
|
||||||
|
</Options>
|
||||||
|
</Linking>
|
||||||
|
</CompilerOptions>
|
||||||
|
<Debugging>
|
||||||
|
<Exceptions Count="3">
|
||||||
|
<Item1>
|
||||||
|
<Name Value="EAbort"/>
|
||||||
|
</Item1>
|
||||||
|
<Item2>
|
||||||
|
<Name Value="ECodetoolError"/>
|
||||||
|
</Item2>
|
||||||
|
<Item3>
|
||||||
|
<Name Value="EFOpenError"/>
|
||||||
|
</Item3>
|
||||||
|
</Exceptions>
|
||||||
|
</Debugging>
|
||||||
|
</CONFIG>
|
@ -0,0 +1,22 @@
|
|||||||
|
program project1;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
uses
|
||||||
|
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||||
|
cthreads,
|
||||||
|
{$ENDIF}{$ENDIF}
|
||||||
|
Interfaces, // this includes the LCL widgetset
|
||||||
|
Forms, ibexpress, rxnew, Unit1
|
||||||
|
{ you can add units after this };
|
||||||
|
|
||||||
|
{$R *.res}
|
||||||
|
|
||||||
|
begin
|
||||||
|
RequireDerivedFormResource:=True;
|
||||||
|
Application.Scaled:=True;
|
||||||
|
Application.Initialize;
|
||||||
|
Application.CreateForm(TForm1, Form1);
|
||||||
|
Application.Run;
|
||||||
|
end.
|
||||||
|
|
@ -0,0 +1,214 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<CONFIG>
|
||||||
|
<ProjectSession>
|
||||||
|
<Version Value="11"/>
|
||||||
|
<BuildModes Active="Default"/>
|
||||||
|
<Units Count="9">
|
||||||
|
<Unit0>
|
||||||
|
<Filename Value="project1.lpr"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<EditorIndex Value="-1"/>
|
||||||
|
<WindowIndex Value="-1"/>
|
||||||
|
<TopLine Value="-1"/>
|
||||||
|
<CursorPos X="-1" Y="-1"/>
|
||||||
|
<UsageCount Value="21"/>
|
||||||
|
</Unit0>
|
||||||
|
<Unit1>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<ComponentName Value="Form1"/>
|
||||||
|
<HasResources Value="True"/>
|
||||||
|
<ResourceBaseClass Value="Form"/>
|
||||||
|
<UnitName Value="Unit1"/>
|
||||||
|
<IsVisibleTab Value="True"/>
|
||||||
|
<CursorPos X="51" Y="9"/>
|
||||||
|
<UsageCount Value="21"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
<LoadedDesigner Value="True"/>
|
||||||
|
</Unit1>
|
||||||
|
<Unit2>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/ibx/runtime/IBQuery.pas"/>
|
||||||
|
<EditorIndex Value="5"/>
|
||||||
|
<TopLine Value="42"/>
|
||||||
|
<CursorPos X="3" Y="55"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit2>
|
||||||
|
<Unit3>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/ibx/runtime/IBCustomDataSet.pas"/>
|
||||||
|
<EditorIndex Value="6"/>
|
||||||
|
<CursorPos X="21" Y="34"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit3>
|
||||||
|
<Unit4>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/ibx/runtime/ibparser.pas"/>
|
||||||
|
<UnitName Value="IBParser"/>
|
||||||
|
<EditorIndex Value="7"/>
|
||||||
|
<TopLine Value="105"/>
|
||||||
|
<CursorPos X="5" Y="124"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit4>
|
||||||
|
<Unit5>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rx_sort_zeos/rxsortzeos.pas"/>
|
||||||
|
<UnitName Value="RxSortZeos"/>
|
||||||
|
<EditorIndex Value="1"/>
|
||||||
|
<TopLine Value="27"/>
|
||||||
|
<CursorPos X="14" Y="43"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit5>
|
||||||
|
<Unit6>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rx_sort_zeos/exsortzeos.pas"/>
|
||||||
|
<EditorIndex Value="4"/>
|
||||||
|
<TopLine Value="85"/>
|
||||||
|
<CursorPos Y="117"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit6>
|
||||||
|
<Unit7>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rx_sort_ibx/rxsortibx.pas"/>
|
||||||
|
<UnitName Value="RxSortIBX"/>
|
||||||
|
<EditorIndex Value="2"/>
|
||||||
|
<CursorPos Y="26"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit7>
|
||||||
|
<Unit8>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rx_sort_ibx/exsortibx.pas"/>
|
||||||
|
<EditorIndex Value="3"/>
|
||||||
|
<TopLine Value="42"/>
|
||||||
|
<CursorPos X="64" Y="50"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit8>
|
||||||
|
</Units>
|
||||||
|
<JumpHistory Count="30" HistoryIndex="29">
|
||||||
|
<Position1>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="68" Column="27" TopLine="31"/>
|
||||||
|
</Position1>
|
||||||
|
<Position2>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="67" Column="27" TopLine="31"/>
|
||||||
|
</Position2>
|
||||||
|
<Position3>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="68" Column="27" TopLine="31"/>
|
||||||
|
</Position3>
|
||||||
|
<Position4>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="69" Column="27" TopLine="32"/>
|
||||||
|
</Position4>
|
||||||
|
<Position5>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="70" Column="27" TopLine="33"/>
|
||||||
|
</Position5>
|
||||||
|
<Position6>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="69" Column="27" TopLine="33"/>
|
||||||
|
</Position6>
|
||||||
|
<Position7>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="70" Column="27" TopLine="34"/>
|
||||||
|
</Position7>
|
||||||
|
<Position8>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="69" Column="27" TopLine="33"/>
|
||||||
|
</Position8>
|
||||||
|
<Position9>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="68" Column="27" TopLine="32"/>
|
||||||
|
</Position9>
|
||||||
|
<Position10>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="67" Column="27" TopLine="31"/>
|
||||||
|
</Position10>
|
||||||
|
<Position11>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="66" Column="27" TopLine="30"/>
|
||||||
|
</Position11>
|
||||||
|
<Position12>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="65" Column="27" TopLine="29"/>
|
||||||
|
</Position12>
|
||||||
|
<Position13>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="64" Column="27" TopLine="28"/>
|
||||||
|
</Position13>
|
||||||
|
<Position14>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="63" Column="27" TopLine="27"/>
|
||||||
|
</Position14>
|
||||||
|
<Position15>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="62" Column="27" TopLine="26"/>
|
||||||
|
</Position15>
|
||||||
|
<Position16>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="61" Column="27" TopLine="25"/>
|
||||||
|
</Position16>
|
||||||
|
<Position17>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="60" Column="27" TopLine="24"/>
|
||||||
|
</Position17>
|
||||||
|
<Position18>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="59" Column="27" TopLine="23"/>
|
||||||
|
</Position18>
|
||||||
|
<Position19>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="60" Column="27" TopLine="24"/>
|
||||||
|
</Position19>
|
||||||
|
<Position20>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="61" Column="27" TopLine="25"/>
|
||||||
|
</Position20>
|
||||||
|
<Position21>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="62" Column="27" TopLine="26"/>
|
||||||
|
</Position21>
|
||||||
|
<Position22>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="63" Column="27" TopLine="27"/>
|
||||||
|
</Position22>
|
||||||
|
<Position23>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="64" Column="27" TopLine="28"/>
|
||||||
|
</Position23>
|
||||||
|
<Position24>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="65" Column="27" TopLine="29"/>
|
||||||
|
</Position24>
|
||||||
|
<Position25>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="66" Column="27" TopLine="30"/>
|
||||||
|
</Position25>
|
||||||
|
<Position26>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="67" Column="27" TopLine="31"/>
|
||||||
|
</Position26>
|
||||||
|
<Position27>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="68" Column="27" TopLine="32"/>
|
||||||
|
</Position27>
|
||||||
|
<Position28>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="69" Column="27" TopLine="33"/>
|
||||||
|
</Position28>
|
||||||
|
<Position29>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="61" Column="19" TopLine="27"/>
|
||||||
|
</Position29>
|
||||||
|
<Position30>
|
||||||
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="9" Column="51"/>
|
||||||
|
</Position30>
|
||||||
|
</JumpHistory>
|
||||||
|
<RunParams>
|
||||||
|
<FormatVersion Value="2"/>
|
||||||
|
<Modes Count="0" ActiveMode=""/>
|
||||||
|
</RunParams>
|
||||||
|
</ProjectSession>
|
||||||
|
</CONFIG>
|
Binary file not shown.
287
components/rx/trunk/demos/rxdbgrid/RxDBGrid_Sort_IBX/unit1.lfm
Normal file
287
components/rx/trunk/demos/rxdbgrid/RxDBGrid_Sort_IBX/unit1.lfm
Normal file
@ -0,0 +1,287 @@
|
|||||||
|
object Form1: TForm1
|
||||||
|
Left = 552
|
||||||
|
Height = 475
|
||||||
|
Top = 244
|
||||||
|
Width = 695
|
||||||
|
Caption = 'Form1'
|
||||||
|
ClientHeight = 475
|
||||||
|
ClientWidth = 695
|
||||||
|
OnCreate = FormCreate
|
||||||
|
LCLVersion = '1.9.0.0'
|
||||||
|
object Button1: TButton
|
||||||
|
Left = 337
|
||||||
|
Height = 25
|
||||||
|
Top = 63
|
||||||
|
Width = 75
|
||||||
|
Caption = 'Button1'
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object PageControl1: TPageControl
|
||||||
|
Left = 0
|
||||||
|
Height = 475
|
||||||
|
Top = 0
|
||||||
|
Width = 695
|
||||||
|
ActivePage = TabSheet2
|
||||||
|
Align = alClient
|
||||||
|
TabIndex = 1
|
||||||
|
TabOrder = 1
|
||||||
|
object TabSheet1: TTabSheet
|
||||||
|
Caption = 'TIBQuery'
|
||||||
|
ClientHeight = 441
|
||||||
|
ClientWidth = 685
|
||||||
|
object RxDBGrid1: TRxDBGrid
|
||||||
|
Left = 0
|
||||||
|
Height = 441
|
||||||
|
Top = 0
|
||||||
|
Width = 685
|
||||||
|
ColumnDefValues.BlobText = '(данные)'
|
||||||
|
TitleButtons = True
|
||||||
|
AutoSort = True
|
||||||
|
KeyStrokes = <
|
||||||
|
item
|
||||||
|
Command = rxgcShowFindDlg
|
||||||
|
ShortCut = 16454
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcShowColumnsDlg
|
||||||
|
ShortCut = 16471
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcShowFilterDlg
|
||||||
|
ShortCut = 16468
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcShowSortDlg
|
||||||
|
ShortCut = 16467
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcShowQuickFilter
|
||||||
|
ShortCut = 16465
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcHideQuickFilter
|
||||||
|
ShortCut = 16456
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcSelectAll
|
||||||
|
ShortCut = 16449
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcDeSelectAll
|
||||||
|
ShortCut = 16429
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcInvertSelection
|
||||||
|
ShortCut = 16426
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcOptimizeColumnsWidth
|
||||||
|
ShortCut = 16427
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcCopyCellValue
|
||||||
|
ShortCut = 16451
|
||||||
|
Enabled = True
|
||||||
|
end>
|
||||||
|
FooterOptions.DrawFullLine = False
|
||||||
|
SearchOptions.QuickSearchOptions = [loCaseInsensitive, loPartialKey]
|
||||||
|
SearchOptions.FromStart = False
|
||||||
|
OptionsRx = [rdgAllowColumnsForm, rdgAllowDialogFind, rdgAllowQuickFilter]
|
||||||
|
Align = alClient
|
||||||
|
Color = clWindow
|
||||||
|
DrawFullLine = False
|
||||||
|
FocusColor = clRed
|
||||||
|
SelectedColor = clHighlight
|
||||||
|
GridLineStyle = psSolid
|
||||||
|
DataSource = DataSource1
|
||||||
|
Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColumnMove, dgColLines, dgRowLines, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit, dgHeaderPushedLook]
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object TabSheet2: TTabSheet
|
||||||
|
Caption = 'TIBDataSet'
|
||||||
|
ClientHeight = 441
|
||||||
|
ClientWidth = 685
|
||||||
|
object RxDBGrid2: TRxDBGrid
|
||||||
|
Left = 0
|
||||||
|
Height = 441
|
||||||
|
Top = 0
|
||||||
|
Width = 685
|
||||||
|
ColumnDefValues.BlobText = '(данные)'
|
||||||
|
TitleButtons = True
|
||||||
|
AutoSort = True
|
||||||
|
KeyStrokes = <
|
||||||
|
item
|
||||||
|
Command = rxgcShowFindDlg
|
||||||
|
ShortCut = 16454
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcShowColumnsDlg
|
||||||
|
ShortCut = 16471
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcShowFilterDlg
|
||||||
|
ShortCut = 16468
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcShowSortDlg
|
||||||
|
ShortCut = 16467
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcShowQuickFilter
|
||||||
|
ShortCut = 16465
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcHideQuickFilter
|
||||||
|
ShortCut = 16456
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcSelectAll
|
||||||
|
ShortCut = 16449
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcDeSelectAll
|
||||||
|
ShortCut = 16429
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcInvertSelection
|
||||||
|
ShortCut = 16426
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcOptimizeColumnsWidth
|
||||||
|
ShortCut = 16427
|
||||||
|
Enabled = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Command = rxgcCopyCellValue
|
||||||
|
ShortCut = 16451
|
||||||
|
Enabled = True
|
||||||
|
end>
|
||||||
|
FooterOptions.DrawFullLine = False
|
||||||
|
SearchOptions.QuickSearchOptions = [loCaseInsensitive, loPartialKey]
|
||||||
|
SearchOptions.FromStart = False
|
||||||
|
OptionsRx = [rdgAllowColumnsForm, rdgAllowDialogFind, rdgAllowQuickFilter]
|
||||||
|
Align = alClient
|
||||||
|
Color = clWindow
|
||||||
|
DrawFullLine = False
|
||||||
|
FocusColor = clRed
|
||||||
|
SelectedColor = clHighlight
|
||||||
|
GridLineStyle = psSolid
|
||||||
|
DataSource = DataSource2
|
||||||
|
Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColumnMove, dgColLines, dgRowLines, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit, dgHeaderPushedLook]
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object IBQuery1: TIBQuery
|
||||||
|
Database = IBDatabase1
|
||||||
|
Transaction = IBTransaction1
|
||||||
|
AutoStartTransaction = True
|
||||||
|
AutoCommit = True
|
||||||
|
AutoTrim = True
|
||||||
|
BufferChunks = 1000
|
||||||
|
CachedUpdates = False
|
||||||
|
GeneratorField.ApplyOnEvent = gaeOnNewRecord
|
||||||
|
SQL.Strings = (
|
||||||
|
'select'
|
||||||
|
' *'
|
||||||
|
'from'
|
||||||
|
' employee'
|
||||||
|
)
|
||||||
|
Params = <>
|
||||||
|
Left = 80
|
||||||
|
Top = 88
|
||||||
|
end
|
||||||
|
object IBDatabase1: TIBDatabase
|
||||||
|
Connected = True
|
||||||
|
LoginPrompt = False
|
||||||
|
AllowStreamedConnected = False
|
||||||
|
DatabaseName = '127.0.0.1:employee'
|
||||||
|
Params.Strings = (
|
||||||
|
'lc_ctype=UTF8'
|
||||||
|
'user_name=sysdba'
|
||||||
|
'password=masterkey'
|
||||||
|
)
|
||||||
|
LibraryName = '/usr/lib64/libfbclient.so.3.0.2'
|
||||||
|
DefaultTransaction = IBTransaction1
|
||||||
|
IdleTimer = 0
|
||||||
|
TraceFlags = []
|
||||||
|
Left = 32
|
||||||
|
Top = 20
|
||||||
|
end
|
||||||
|
object IBTransaction1: TIBTransaction
|
||||||
|
Active = False
|
||||||
|
DefaultDatabase = IBDatabase1
|
||||||
|
Left = 80
|
||||||
|
Top = 20
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = IBQuery1
|
||||||
|
Left = 120
|
||||||
|
Top = 88
|
||||||
|
end
|
||||||
|
object IBDataSet1: TIBDataSet
|
||||||
|
Database = IBDatabase1
|
||||||
|
Transaction = IBTransaction1
|
||||||
|
AutoStartTransaction = True
|
||||||
|
AutoCommit = True
|
||||||
|
AutoTrim = True
|
||||||
|
AutoParamToField = True
|
||||||
|
UpdateTransaction = IBTransaction1
|
||||||
|
RetFields = True
|
||||||
|
BufferChunks = 1000
|
||||||
|
CachedUpdates = False
|
||||||
|
DeleteSQL.Strings = (
|
||||||
|
'Delete From COUNTRY A'
|
||||||
|
'Where A.COUNTRY = :COUNTRY'
|
||||||
|
)
|
||||||
|
InsertSQL.Strings = (
|
||||||
|
'Insert Into COUNTRY(CURRENCY)'
|
||||||
|
'Values(:CURRENCY) Returning COUNTRY'
|
||||||
|
)
|
||||||
|
RefreshSQL.Strings = (
|
||||||
|
'Select A.COUNTRY, A.CURRENCY From COUNTRY A'
|
||||||
|
'Where A.COUNTRY = :COUNTRY'
|
||||||
|
)
|
||||||
|
SelectSQL.Strings = (
|
||||||
|
'Select A.COUNTRY, A.CURRENCY From COUNTRY A'
|
||||||
|
)
|
||||||
|
ModifySQL.Strings = (
|
||||||
|
'Update COUNTRY A Set '#13#10' A.COUNTRY = :COUNTRY,'#13#10' A.CURRENCY = :CURRENCY'
|
||||||
|
'Where A.COUNTRY = :OLD_COUNTRY'
|
||||||
|
)
|
||||||
|
GeneratorField.ApplyOnEvent = gaeOnNewRecord
|
||||||
|
DefValueFromServer = False
|
||||||
|
DetailConditoins = []
|
||||||
|
Left = 80
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object RxSortIBX1: TRxSortIBX
|
||||||
|
Left = 424
|
||||||
|
Top = 48
|
||||||
|
end
|
||||||
|
object DataSource2: TDataSource
|
||||||
|
DataSet = IBDataSet1
|
||||||
|
Left = 120
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,54 @@
|
|||||||
|
unit Unit1;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ComCtrls, db,
|
||||||
|
IBQuery, IBDatabase, IBCustomDataSet, rxdbgrid, RxSortIBX;
|
||||||
|
|
||||||
|
type
|
||||||
|
|
||||||
|
{ TForm1 }
|
||||||
|
|
||||||
|
TForm1 = class(TForm)
|
||||||
|
Button1: TButton;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
DataSource2: TDataSource;
|
||||||
|
IBDatabase1: TIBDatabase;
|
||||||
|
IBDataSet1: TIBDataSet;
|
||||||
|
IBQuery1: TIBQuery;
|
||||||
|
IBTransaction1: TIBTransaction;
|
||||||
|
PageControl1: TPageControl;
|
||||||
|
RxDBGrid1: TRxDBGrid;
|
||||||
|
RxDBGrid2: TRxDBGrid;
|
||||||
|
RxSortIBX1: TRxSortIBX;
|
||||||
|
TabSheet1: TTabSheet;
|
||||||
|
TabSheet2: TTabSheet;
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
private
|
||||||
|
|
||||||
|
public
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
Form1: TForm1;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
{$R *.lfm}
|
||||||
|
|
||||||
|
{ TForm1 }
|
||||||
|
|
||||||
|
procedure TForm1.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
IBDatabase1.Connected:=true;
|
||||||
|
IBTransaction1.StartTransaction;
|
||||||
|
IBQuery1.Open;
|
||||||
|
IBDataSet1.Open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
Reference in New Issue
Block a user