v 4.1.1 Issue on delphi 2009 (record changes by another user)

PascalVB

Member²
Hello. I open oracledataset with select query, which contains BLOB field. And when i try to edit some record i receive error:
Record was changes by another user.
 
SELECT O.ROWID, O.* FROM OV_VIEWS O WHERE O.OVERVIEW_ID = :id

CREATE TABLE OV_VIEWS
(
OVERVIEW_ID VARCHAR2(10) NOT NULL,
OVNAME VARCHAR2(50) NULL,
FILTER_ID VARCHAR2(10) NULL,
CATEGORY VARCHAR2(20) NULL,
ENABLED CHAR(1) DEFAULT '1' NULL,
RESTRICTED CHAR(1) DEFAULT '0' NULL,
IS_PUBLIC CHAR(1) DEFAULT '0' NULL,
BIN_IMAGE BLOB NULL,
LAST_MOD_DATE DATE NULL,
REFRESH_LEVEL INTEGER DEFAULT 0 NULL,
COLUMN_INF CLOB NULL,
ORDER_INF CLOB NULL,
ACCOUNT_ID VARCHAR2(10) NULL,
LAST_MOD_ACCOUNT VARCHAR2(10) NULL,
IS_AREA_OF_RESP CHAR(1) DEFAULT '0' NULL,
AREA_OVERVIEW_ID VARCHAR2(10) NULL,
PNG_IMAGE BLOB NULL
)
LOGGING
NOCACHE
NOPARALLEL;
 
We have not been able to reproduce this. Note that this usually indicates that there is a database trigger or a database default value that causes these differences. It can also be that the query performs some calculations and applies an alias with an existing column name. In these cases you can set the RefreshOptions property of the dataset.
 
OracleData CompareFieldToVariant
I think this block have error in Equal := (Length(s) = l) and CompareMem(p, @s[1], l);

In Delphi 2007

if CompareOld then vd := AField.OldValue else vd := AField.Value;

VarType(AField.OldValue) = 256

In Delphi 2009

if CompareOld then vd := AField.OldValue else vd := AField.Value;

VarType(AField.OldValue) = 8209

?????

In version 4.1 Delphi 2007 this work correct

otBLOB,
otLongRaw: begin
// For BLOBs we need to compare the binary, uncompressed data
p := VarArrayLock(AValue);
try
l := VarArrayHighBound(AValue, 1) - VarArrayLowBound(AValue, 1) + 1;
FreeIt := DoBLOBDecompress(AField as TBLOBField, p, l, False);
finally
VarArrayUnlock(AValue);
end;
s := vd;
Equal := (Length(s) = l) and CompareMem(p, @s[1], l);
if FreeIt then FreeMem(p, l);
//+++if not Equal then Exit;
end;
 
Last edited:
Back
Top