1 |
< |
unit Test7; |
1 |
> |
unit Test7; |
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 7: Create and read back an Array} |
12 |
|
|
40 |
|
private |
41 |
|
procedure UpdateDatabase(Attachment: IAttachment); |
42 |
|
public |
43 |
< |
function TestTitle: string; override; |
44 |
< |
procedure RunTest(CharSet: string; SQLDialect: integer); override; |
43 |
> |
function TestTitle: AnsiString; override; |
44 |
> |
procedure RunTest(CharSet: AnsiString; SQLDialect: integer); override; |
45 |
|
end; |
46 |
|
|
47 |
|
implementation |
80 |
|
for i := 0 to GetCount - 1 do |
81 |
|
writeln(OutFile,'Param Name = ',Params[i].getName); |
82 |
|
ByName('rowid').AsInteger := 1; |
83 |
+ |
{$IFDEF DCC} |
84 |
+ |
ByName('title').AsString := UTF8Encode('Blob Test ©€'); |
85 |
+ |
ByName('Notes').AsString := UTF8Encode('Écoute moi'); |
86 |
+ |
{$ELSE} |
87 |
|
ByName('title').AsString := 'Blob Test ©€'; |
88 |
|
ByName('Notes').AsString := 'Écoute moi'; |
89 |
+ |
{$ENDIF} |
90 |
|
ByName('Dated').AsDateTime := EncodeDate(2016,4,1) + EncodeTime(9,30,0,100); |
91 |
|
end; |
92 |
|
Statement.Execute; |
132 |
|
Transaction.Commit; |
133 |
|
end; |
134 |
|
|
135 |
< |
function TTest7.TestTitle: string; |
135 |
> |
function TTest7.TestTitle: AnsiString; |
136 |
|
begin |
137 |
|
Result := 'Test 7: Create and read back an Array'; |
138 |
|
end; |
139 |
|
|
140 |
< |
procedure TTest7.RunTest(CharSet: string; SQLDialect: integer); |
140 |
> |
procedure TTest7.RunTest(CharSet: AnsiString; SQLDialect: integer); |
141 |
|
var DPB: IDPB; |
142 |
|
Attachment: IAttachment; |
143 |
|
begin |