109 |
|
end; |
110 |
|
Statement.Execute; |
111 |
|
|
112 |
+ |
Statement := Attachment.PrepareWithNamedParameters(Transaction,sqlInsert); |
113 |
+ |
with Statement.GetSQLParams do |
114 |
+ |
begin |
115 |
+ |
ByName('rowid').AsInteger := 2; |
116 |
+ |
ByName('title').AsString := 'Blob Test with binary string'; |
117 |
+ |
aText := #$0#$09#$0a {random digits} + |
118 |
+ |
#$C9#$63#$6F#$75#$74#$65#$20#$6D#$6F#$69; {Écoute moi' encoded in Win1252} |
119 |
+ |
ByName('BlobData').AsString := aText; |
120 |
+ |
end; |
121 |
+ |
Statement.Execute; |
122 |
+ |
|
123 |
|
BPB := Attachment.AllocateBPB; |
124 |
|
BPB.Add(isc_bpb_target_type).AsInteger := 1; |
125 |
|
BPB.Add(isc_bpb_target_interp).AsInteger := 4; {utf8} |
142 |
|
Statement: IStatement; |
143 |
|
begin |
144 |
|
Transaction := Attachment.StartTransaction([isc_tpb_read,isc_tpb_nowait,isc_tpb_concurrency],taCommit); |
145 |
< |
Statement := Attachment.Prepare(Transaction,'Select * from TestData '); |
145 |
> |
Statement := Attachment.Prepare(Transaction,'Select * from TestData Where RowID = 1'); |
146 |
|
writeln(OutFile); |
147 |
|
writeln(OutFile,'Testdata'); |
148 |
|
writeln(OutFile); |
149 |
|
ReportResults(Statement); |
150 |
+ |
FShowBinaryBlob := true; |
151 |
+ |
Statement := Attachment.Prepare(Transaction,'Select * from TestData Where RowID = 2'); |
152 |
+ |
ReportResults(Statement); |
153 |
+ |
FShowBinaryBlob := false; |
154 |
+ |
|
155 |
|
Statement := Attachment.Prepare(Transaction,'Select * from TestData2 '); |
156 |
|
writeln(OutFile); |
157 |
|
writeln(OutFile,'Testdata 2'); |