ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/examples/local-employeedb/ConsoleModeExample.lpr
(Generate patch)

Comparing ibx/trunk/examples/local-employeedb/ConsoleModeExample.lpr (file contents):
Revision 37 by tony, Mon Feb 15 14:44:25 2016 UTC vs.
Revision 380 by tony, Mon Jan 10 10:13:17 2022 UTC

# Line 1 | Line 1
1 + (*
2 + *  IBX For Lazarus (Firebird Express)
3 + *
4 + *  The contents of this file are subject to the Initial Developer's
5 + *  Public License Version 1.0 (the "License"); you may not use this
6 + *  file except in compliance with the License. You may obtain a copy
7 + *  of the License here:
8 + *
9 + *    http://www.firebirdsql.org/index.php?op=doc&id=idpl
10 + *
11 + *  Software distributed under the License is distributed on an "AS
12 + *  IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
13 + *  implied. See the License for the specific language governing rights
14 + *  and limitations under the License.
15 + *
16 + *  The Initial Developer of the Original Code is Tony Whyman.
17 + *
18 + *  The Original Code is (C) 2015 Tony Whyman, MWA Software
19 + *  (http://www.mwasoftware.co.uk).
20 + *
21 + *  All Rights Reserved.
22 + *
23 + *  Contributor(s): ______________________________________.
24 + *
25 + *)
26 +            
27   program ConsoleModeExample;
28  
29   {
# Line 28 | Line 54 | const
54   'cast(DEPT_NO as VarChar(64)) as DEPT_KEY_PATH '+
55   'From DEPARTMENT Where HEAD_DEPT is NULL '+
56   'UNION ALL '+
57 < 'Select DEPT_NO, DEPARTMENT, HEAD_DEPT, Depts.DEPT_PATH ||  '' / '' || DEPARTMENT as DEPT_PATH,'+
58 < 'Depts.DEPT_KEY_PATH || '';'' || DEPT_NO as DEPT_KEY_PATH '+
59 < 'From DEPARTMENT '+
60 < 'JOIN Depts On HEAD_DEPT = Depts.DEPT_NO '+
57 > 'Select D.DEPT_NO, D.DEPARTMENT, D.HEAD_DEPT, Depts.DEPT_PATH ||  '' / '' || D.DEPARTMENT as DEPT_PATH,'+
58 > 'Depts.DEPT_KEY_PATH || '';'' || D.DEPT_NO as DEPT_KEY_PATH '+
59 > 'From DEPARTMENT D '+
60 > 'JOIN Depts On D.HEAD_DEPT = Depts.DEPT_NO '+
61   ')'+
62  
63   'Select First 2 A.EMP_NO, A.FIRST_NAME, A.LAST_NAME, A.PHONE_EXT, A.HIRE_DATE, A.DEPT_NO, A.JOB_CODE,'+
# Line 66 | Line 92 | begin
92    with TIBQuery.Create(self) do
93    try
94       Database := FIBDatabase;
95 +     AllowAutoActivateTransaction := true;
96       SQL.Text := sqlExample;
97       Active := true;
98       rowno := 1;
# Line 90 | Line 117 | procedure TMyApplication.HandleGetDBVers
117    var VersionNo: integer);
118   begin
119    VersionNo := 0;
120 <  with FIBTransaction do
94 <    if not InTransaction then StartTransaction;
120 >  FIBTransaction.Active := true;
121    try
122      with TIBSQL.Create(nil) do
123      try
# Line 182 | Line 208 | begin
208    FLocalDB.OnGetDBVersionNo := @HandleGetDBVersionNo;
209    FLocalDB.OnLogMessage := @HandleLogMessage;
210    FLocalDB.RequiredVersionNo := 2;
211 +  FLocalDB.UpgradeConfFile := 'upgrade.conf'
212   end;
213  
214   procedure TMyApplication.WriteHelp;
# Line 197 | Line 224 | begin
224    Application:=TMyApplication.Create(nil);
225    Application.Title:='Console Mode and TIBLocalSupport';
226    Application.Run;
227 +  {$IFDEF WINDOWS}
228 +  Readln; {Gives a chance to see the program output}
229 +  {$ENDIF}
230    Application.Free;
231   end.
232  

Comparing ibx/trunk/examples/local-employeedb/ConsoleModeExample.lpr (property svn:eol-style):
Revision 37 by tony, Mon Feb 15 14:44:25 2016 UTC vs.
Revision 380 by tony, Mon Jan 10 10:13:17 2022 UTC

# Line 0 | Line 1
1 + native

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines