126 |
|
|
127 |
|
implementation |
128 |
|
|
129 |
< |
uses IBErrorCodes, FBMessages, FBParamBlock; |
129 |
> |
uses IBErrorCodes, FBMessages, FBParamBlock, IBUtils; |
130 |
|
|
131 |
|
{ TFB25BlobMetaData } |
132 |
|
|
145 |
|
if FHasFullMetaData then Exit; |
146 |
|
|
147 |
|
FSegmentSize := 80; |
148 |
< |
RelName := AnsiUpperCase(GetRelationName); |
149 |
< |
ColName := AnsiUpperCase(GetColumnName); |
148 |
> |
RelName := SafeAnsiUpperCase(GetRelationName); |
149 |
> |
ColName := SafeAnsiUpperCase(GetColumnName); |
150 |
|
if (ColName <> '') and (RelName <> '') then |
151 |
|
begin |
152 |
|
with FFirebird25ClientAPI do |
177 |
|
FAttachment := Attachment; |
178 |
|
FTransaction := Transaction; |
179 |
|
FFirebird25ClientAPI := Attachment.Firebird25ClientAPI; |
180 |
< |
OnDatabaseError := FFirebird25ClientAPI.IBDataBaseError; |
180 |
> |
OnDatabaseError := Attachment.IBDataBaseError; |
181 |
|
end; |
182 |
|
|
183 |
|
constructor TFB25BlobMetaData.Create(Attachment: TFB25Attachment; |
245 |
|
DBHandle := Attachment.Handle; |
246 |
|
TRHandle := Transaction.Handle; |
247 |
|
FFirebird25ClientAPI := Attachment.Firebird25ClientAPI; |
248 |
< |
OnDatabaseError := FFirebird25ClientAPI.IBDataBaseError; |
248 |
> |
OnDatabaseError := Attachment.IBDataBaseError; |
249 |
|
with FFirebird25ClientAPI do |
250 |
|
if BPB = nil then |
251 |
|
Call(isc_create_blob2(StatusVector, @DBHandle, @TRHandle, @FHandle, @FBlobID, |
270 |
|
DBHandle := Attachment.Handle; |
271 |
|
TRHandle := Transaction.Handle; |
272 |
|
FFirebird25ClientAPI := Attachment.Firebird25ClientAPI; |
273 |
< |
OnDatabaseError := FFirebird25ClientAPI.IBDataBaseError; |
273 |
> |
OnDatabaseError := Attachment.IBDataBaseError; |
274 |
|
with FFirebird25ClientAPI do |
275 |
|
if BPB = nil then |
276 |
|
Call(isc_create_blob2(StatusVector, @DBHandle, @TRHandle, @FHandle, @FBlobID, |
290 |
|
DBHandle := Attachment.Handle; |
291 |
|
TRHandle := Transaction.Handle; |
292 |
|
FFirebird25ClientAPI := Attachment.Firebird25ClientAPI; |
293 |
< |
OnDatabaseError := FFirebird25ClientAPI.IBDataBaseError; |
293 |
> |
OnDatabaseError := Attachment.IBDataBaseError; |
294 |
|
if (BlobID.gds_quad_high = 0) and (BlobID.gds_quad_low = 0) then |
295 |
|
Exit; |
296 |
|
|
333 |
|
FEOB := returnCode = isc_segstr_eof; |
334 |
|
ClearStringCache; |
335 |
|
if (returnCode <> 0) and (returnCode <> isc_segment) and (returnCode <> isc_segstr_eof) then |
336 |
< |
FFirebird25ClientAPI.IBDataBaseError |
336 |
> |
raise EIBInterBaseError.Create(FFirebird25ClientAPI.GetStatus,ConnectionCodePage); |
337 |
|
end; |
338 |
|
|
339 |
|
function TFB25Blob.Write(const Buffer; Count: Longint): Longint; |