1 |
|
unit Test14; |
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 14: Non select procedures} |
12 |
|
|
30 |
|
procedure UpdateDatabase(Attachment: IAttachment); |
31 |
|
procedure QueryDatabase(Attachment: IAttachment); |
32 |
|
public |
33 |
< |
function TestTitle: string; override; |
34 |
< |
procedure RunTest(CharSet: string; SQLDialect: integer); override; |
33 |
> |
function TestTitle: AnsiString; override; |
34 |
> |
procedure RunTest(CharSet: AnsiString; SQLDialect: integer); override; |
35 |
|
end; |
36 |
|
|
37 |
|
implementation |
74 |
|
ReportResult(Statement.Execute); |
75 |
|
end; |
76 |
|
|
77 |
< |
function TTest14.TestTitle: string; |
77 |
> |
function TTest14.TestTitle: AnsiString; |
78 |
|
begin |
79 |
|
Result := 'Test 14: Non select procedures'; |
80 |
|
end; |
101 |
|
|
102 |
|
|
103 |
|
|
104 |
< |
procedure TTest14.RunTest(CharSet: string; SQLDialect: integer); |
104 |
> |
procedure TTest14.RunTest(CharSet: AnsiString; SQLDialect: integer); |
105 |
|
var DPB: IDPB; |
106 |
|
Attachment: IAttachment; |
107 |
|
begin |
111 |
|
DPB.Add(isc_dpb_lc_ctype).setAsString('UTF8'); |
112 |
|
DPB.Add(isc_dpb_set_db_SQL_dialect).setAsByte(SQLDialect); |
113 |
|
Attachment := FirebirdAPI.CreateDatabase(Owner.GetNewDatabaseName,DPB); |
114 |
< |
writeln(OutFile,'Default Character set Name = ',Attachment.OpenCursorAtStart('Select RDB$CHARACTER_SET_NAME From RDB$Database')[0].AsString); |
114 |
> |
writeln(OutFile,'Default Character set Name = ',Trim(Attachment.OpenCursorAtStart('Select RDB$CHARACTER_SET_NAME From RDB$Database')[0].AsString)); |
115 |
|
Attachment.ExecImmediate([isc_tpb_write,isc_tpb_wait,isc_tpb_consistency],sqlCreateTable); |
116 |
|
Attachment.ExecImmediate([isc_tpb_write,isc_tpb_wait,isc_tpb_consistency],sqlCreateProc1); |
117 |
|
Attachment.ExecImmediate([isc_tpb_write,isc_tpb_wait,isc_tpb_consistency],sqlCreateProc2); |