mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 13:49:39 +02:00
* Use the transaction of the query when assigning blob-parameters, not the connections transaction
git-svn-id: trunk@12679 -
This commit is contained in:
parent
2730c5f705
commit
1d66bf0764
@ -65,7 +65,7 @@ type
|
|||||||
procedure SetFloat(CurrBuff: pointer; Dbl: Double; Size: integer);
|
procedure SetFloat(CurrBuff: pointer; Dbl: Double; Size: integer);
|
||||||
procedure CheckError(ProcName : string; Status : PISC_STATUS);
|
procedure CheckError(ProcName : string; Status : PISC_STATUS);
|
||||||
function getMaxBlobSize(blobHandle : TIsc_Blob_Handle) : longInt;
|
function getMaxBlobSize(blobHandle : TIsc_Blob_Handle) : longInt;
|
||||||
procedure SetParameters(cursor : TSQLCursor;AParams : TParams);
|
procedure SetParameters(cursor : TSQLCursor; aTransation : TSQLTransaction; AParams : TParams);
|
||||||
procedure FreeSQLDABuffer(var aSQLDA : PXSQLDA);
|
procedure FreeSQLDABuffer(var aSQLDA : PXSQLDA);
|
||||||
function IsDialectStored: boolean;
|
function IsDialectStored: boolean;
|
||||||
protected
|
protected
|
||||||
@ -655,7 +655,7 @@ procedure TIBConnection.Execute(cursor: TSQLCursor;atransaction:tSQLtransaction;
|
|||||||
var tr : pointer;
|
var tr : pointer;
|
||||||
begin
|
begin
|
||||||
tr := aTransaction.Handle;
|
tr := aTransaction.Handle;
|
||||||
if Assigned(APArams) and (AParams.count > 0) then SetParameters(cursor, AParams);
|
if Assigned(APArams) and (AParams.count > 0) then SetParameters(cursor, atransaction, AParams);
|
||||||
with cursor as TIBCursor do
|
with cursor as TIBCursor do
|
||||||
if isc_dsql_execute2(@Status[0], @tr, @Statement, 1, in_SQLDA, nil) <> 0 then
|
if isc_dsql_execute2(@Status[0], @tr, @Statement, 1, in_SQLDA, nil) <> 0 then
|
||||||
CheckError('Execute', Status);
|
CheckError('Execute', Status);
|
||||||
@ -713,7 +713,7 @@ begin
|
|||||||
Result := (retcode <> 100);
|
Result := (retcode <> 100);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIBConnection.SetParameters(cursor : TSQLCursor;AParams : TParams);
|
procedure TIBConnection.SetParameters(cursor : TSQLCursor; aTransation : TSQLTransaction; AParams : TParams);
|
||||||
|
|
||||||
var ParNr,SQLVarNr : integer;
|
var ParNr,SQLVarNr : integer;
|
||||||
s : string;
|
s : string;
|
||||||
@ -735,7 +735,7 @@ var ParNr,SQLVarNr : integer;
|
|||||||
{$R-}
|
{$R-}
|
||||||
with cursor as TIBCursor do
|
with cursor as TIBCursor do
|
||||||
begin
|
begin
|
||||||
TransactionHandle := transaction.Handle;
|
TransactionHandle := aTransation.Handle;
|
||||||
blobhandle := nil;
|
blobhandle := nil;
|
||||||
if isc_create_blob(@FStatus[0], @FSQLDatabaseHandle, @TransactionHandle, @blobHandle, @blobId) <> 0 then
|
if isc_create_blob(@FStatus[0], @FSQLDatabaseHandle, @TransactionHandle, @blobHandle, @blobId) <> 0 then
|
||||||
CheckError('TIBConnection.CreateBlobStream', FStatus);
|
CheckError('TIBConnection.CreateBlobStream', FStatus);
|
||||||
|
Loading…
Reference in New Issue
Block a user