73 |
|
Transaction.Rollback; |
74 |
|
Transaction.Start(TARollback); |
75 |
|
|
76 |
< |
Statement := Attachment.PrepareWithNamedParameters(Transaction,'Select * from EMPLOYEE Where EMP_NO = :EMP_NO',3); |
76 |
> |
Statement := Attachment.PrepareWithNamedParameters(Transaction,'Select * from EMPLOYEE Where EMP_NO = :F1',3); |
77 |
|
Statement.EnableStatistics(true); |
78 |
< |
Statement.GetSQLParams.ByName('EMP_NO').AsInteger := 8; |
78 |
> |
Statement.GetSQLParams.ByName('F1').AsInteger := 8; |
79 |
|
ReportResults(Statement); |
80 |
|
if Statement.GetPerfStatistics(stats) then |
81 |
|
WritePerfStats(stats); |
222 |
|
procedure TTest4.RunTest(CharSet: AnsiString; SQLDialect: integer); |
223 |
|
var Attachment: IAttachment; |
224 |
|
DPB: IDPB; |
225 |
+ |
S: TStrings; |
226 |
+ |
i: integer; |
227 |
|
begin |
228 |
|
DPB := FirebirdAPI.AllocateDPB; |
229 |
|
DPB.Add(isc_dpb_user_name).setAsString(Owner.GetUserName); |
230 |
|
DPB.Add(isc_dpb_password).setAsString(Owner.GetPassword); |
231 |
|
DPB.Add(isc_dpb_lc_ctype).setAsString(CharSet); |
232 |
|
DPB.Add(isc_dpb_set_db_SQL_dialect).setAsByte(SQLDialect); |
233 |
+ |
DPB.Add(isc_dpb_config).SetAsString('WireCompression=true'); |
234 |
|
|
235 |
|
writeln(OutFile,'Opening ',Owner.GetEmployeeDatabaseName); |
236 |
|
Attachment := FirebirdAPI.OpenDatabase(Owner.GetEmployeeDatabaseName,DPB); |
237 |
|
writeln(OutFile,'Database Open'); |
238 |
+ |
S := TStringList.Create; |
239 |
+ |
try |
240 |
+ |
Attachment.getFBVersion(S); |
241 |
+ |
for i := 0 to S.Count -1 do |
242 |
+ |
writeln(OutFile,S[i]); |
243 |
+ |
finally |
244 |
+ |
S.Free; |
245 |
+ |
end; |
246 |
|
DoQuery(Attachment); |
247 |
|
end; |
248 |
|
|