1 |
|
unit test2; |
2 |
+ |
{$IFDEF MSWINDOWS} |
3 |
+ |
{$DEFINE WINDOWS} |
4 |
+ |
{$ENDIF} |
5 |
|
|
6 |
< |
{$mode objfpc}{$H+} |
6 |
> |
{$IFDEF FPC} |
7 |
> |
{$mode delphi} |
8 |
|
{$codepage utf8} |
9 |
+ |
{$ENDIF} |
10 |
|
|
11 |
|
{Test 2: Open the employee database and run a query} |
12 |
|
|
36 |
|
private |
37 |
|
procedure DoQuery(Attachment: IAttachment); |
38 |
|
public |
39 |
< |
function TestTitle: string; override; |
40 |
< |
procedure RunTest(CharSet: string; SQLDialect: integer); override; |
39 |
> |
function TestTitle: AnsiString; override; |
40 |
> |
procedure RunTest(CharSet: AnsiString; SQLDialect: integer); override; |
41 |
|
end; |
42 |
|
|
43 |
|
|
75 |
|
end; |
76 |
|
end; |
77 |
|
|
78 |
< |
function TTest2.TestTitle: string; |
78 |
> |
function TTest2.TestTitle: AnsiString; |
79 |
|
begin |
80 |
|
Result := 'Test 2: Open the employee database and run a query'; |
81 |
|
end; |
82 |
|
|
83 |
< |
procedure TTest2.RunTest(CharSet: string; SQLDialect: integer); |
83 |
> |
procedure TTest2.RunTest(CharSet: AnsiString; SQLDialect: integer); |
84 |
|
var Attachment: IAttachment; |
85 |
|
DPB: IDPB; |
86 |
|
begin |
97 |
|
end; |
98 |
|
writeln(OutFile,'Opening ',Owner.GetEmployeeDatabaseName); |
99 |
|
Attachment := FirebirdAPI.OpenDatabase(Owner.GetEmployeeDatabaseName,DPB); |
100 |
< |
writeln(OutFile,'Database Open'); |
100 |
> |
writeln(OutFile,'Database Open, SQL Dialect = ',Attachment.GetSQLDialect); |
101 |
|
DoQuery(Attachment); |
102 |
|
Attachment.Disconnect; |
103 |
|
end; |