Print Thread
v 4.1.1 Issue on delphi 2009 (record changes by another user)
#33599 03/16/09 09:32 AM
Joined: Feb 2009
Posts: 19
P
Member
OP Offline
Member
P
Joined: Feb 2009
Posts: 19
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.

Re: v 4.1.1 Issue on delphi 2009 (record changes by another user)
PascalVB #33604 03/16/09 11:47 AM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
Can you let me know the SQL.Text of the dataset, and the definition of the table(s) it uses?


Marco Kalter
Allround Automations
Re: v 4.1.1 Issue on delphi 2009 (record changes by another user)
Marco Kalter #33612 03/17/09 09:27 AM
Joined: Feb 2009
Posts: 19
P
Member
OP Offline
Member
P
Joined: Feb 2009
Posts: 19
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;

Re: v 4.1.1 Issue on delphi 2009 (record changes by another user)
PascalVB #33613 03/17/09 09:42 AM
Joined: Feb 2009
Posts: 19
P
Member
OP Offline
Member
P
Joined: Feb 2009
Posts: 19
BIN_IMAGE is BMP 32x32

Re: v 4.1.1 Issue on delphi 2009 (record changes by another user)
PascalVB #33616 03/17/09 11:30 AM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
Thanks, I will check it out.


Marco Kalter
Allround Automations
Re: v 4.1.1 Issue on delphi 2009 (record changes by another user)
Marco Kalter #33699 03/28/09 02:44 PM
Joined: Feb 2009
Posts: 10
A
Member
Offline
Member
A
Joined: Feb 2009
Posts: 10
What I do in this situation?

Re: v 4.1.1 Issue on delphi 2009 (record changes by another user)
Anatoliy #33704 03/30/09 09:48 AM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
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.


Marco Kalter
Allround Automations
Re: v 4.1.1 Issue on delphi 2009 (record changes by another user)
Marco Kalter #33720 03/30/09 02:35 PM
Joined: Feb 2009
Posts: 10
A
Member
Offline
Member
A
Joined: Feb 2009
Posts: 10
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 by Anatoliy; 03/30/09 03:30 PM.
Re: v 4.1.1 Issue on delphi 2009 (record changes by another user)
Anatoliy #33725 03/31/09 09:45 AM
Joined: Feb 2009
Posts: 10
A
Member
Offline
Member
A
Joined: Feb 2009
Posts: 10
I use Database and Client Oracle 11.1.0.7.0 + Patch8 on Windows


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.213s Queries: 14 (0.097s) Memory: 2.5365 MB (Peak: 3.0405 MB) Data Comp: Off Server Time: 2024-05-17 00:19:02 UTC
Valid HTML 5 and Valid CSS