ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/fbintf/testsuite/Test4.pas
(Generate patch)

Comparing ibx/trunk/fbintf/testsuite/Test4.pas (file contents):
Revision 45 by tony, Tue Dec 6 10:33:46 2016 UTC vs.
Revision 47 by tony, Mon Jan 9 15:31:51 2017 UTC

# Line 57 | Line 57 | procedure TTest4.DoQuery(Attachment: IAt
57   var Transaction, Transaction2, Transaction3: ITransaction;
58      Statement: IStatement;
59      Rows: IResultSet;
60 +    stats: TPerfCounters;
61   begin
62    Transaction := Attachment.StartTransaction([isc_tpb_write,isc_tpb_nowait,isc_tpb_concurrency],taRollback);
63    Statement := Attachment.Prepare(Transaction,'Update Employee Set Hire_Date = ? Where EMP_NO = ?',3);
# Line 68 | Line 69 | begin
69    Transaction.Start(TARollback);
70  
71    Statement := Attachment.PrepareWithNamedParameters(Transaction,'Select * from EMPLOYEE Where EMP_NO = :EMP_NO',3);
72 +  Statement.EnableStatistics(true);
73    Statement.GetSQLParams.ByName('EMP_NO').AsInteger := 8;
74    ReportResults(Statement);
75 +  if Statement.GetPerfStatistics(stats) then
76 +    WritePerfStats(stats);
77  
78    Statement := Attachment.PrepareWithNamedParameters(Transaction,'INSERT INTO EMPLOYEE (EMP_NO, FIRST_NAME, LAST_NAME, PHONE_EXT, HIRE_DATE,' +
79        'DEPT_NO, JOB_CODE, JOB_GRADE, JOB_COUNTRY, SALARY) '+
# Line 81 | Line 85 | begin
85      ByName('FIRST_NAME').AsString := 'John';
86      ByName('LAST_NAME').AsString := 'Doe';
87      ByName('PHONE_EXT').AsString := '';
88 <    ByName('HIRE_DATE').AsDateTime := EncodeDate(2015,4,1);;
88 >    ByName('HIRE_DATE').AsDateTime := EncodeDate(2015,4,1);
89      ByName('DEPT_NO').AsString := '600';
90      ByName('JOB_CODE').AsString := 'Eng';
91      ByName('JOB_GRADE').AsInteger := 4;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines