51 |
|
ResultSet: IResultSet; |
52 |
|
begin |
53 |
|
Transaction := Attachment.StartTransaction([isc_tpb_read,isc_tpb_nowait,isc_tpb_concurrency],taCommit); |
54 |
< |
Statement := Attachment.Prepare(Transaction,'Select First 3 * from EMPLOYEE',3); |
54 |
> |
Statement := Attachment.Prepare(Transaction, |
55 |
> |
'-- SQL style inline comment' + LineEnding + |
56 |
> |
'/* this is a comment */ '+ |
57 |
> |
'Select First 3 * from EMPLOYEE' |
58 |
> |
,3); |
59 |
|
PrintMetaData(Statement.GetMetaData); |
60 |
|
writeln(OutFile,'Plan = ' ,Statement.GetPlan); |
61 |
|
writeln(OutFile,Statement.GetSQLText); |
67 |
|
Statement.GetSQLParams[0].AsInteger := 8; |
68 |
|
ReportResults(Statement); |
69 |
|
writeln(OutFile,'With param names'); |
70 |
< |
Statement := Attachment.PrepareWithNamedParameters(Transaction,'Select * from EMPLOYEE Where EMP_NO = :EMP_NO',3); |
70 |
> |
Statement := Attachment.PrepareWithNamedParameters(Transaction, |
71 |
> |
'Select * from EMPLOYEE Where EMP_NO = :EMP_NO',3); |
72 |
|
Statement.SetRetainInterfaces(true); |
73 |
|
try |
74 |
|
writeln(OutFile,Statement.GetSQLText); |