Record has been changed by another user ...

NDzubiel

Member²
Marco,

here is a demo:
http://www.nhd.com/nhddownload/SM/DemoProblem.2011-12-03.01.zip

You need to create the demo table within a unicode database (I am using Oracle 11.2.0.2 Patch 13). The SQL Script loads one record - you might need to modify the queries.

When the program does a .Edit you will get a "Record has been changed by another user ... evenso nothing was changed. It looks as if the field "VARIABLEN" which contains a 0x0d 0x0a is not returned correctly -

I hope you can help.

Thank you

Nils
 
Marco,

you are using the SysUtils.TrimRight function. This function
deletes all characters 0) and (S > ' ') then Exit(S);
while (I > 0) and (S = ' ') do Dec(I);
Result := Copy(S, 1, I);
end;
 
Macro,

also please check the "Record has been changed by another user" -
I think there is a little problem ...

Thank you.
 
Macro,

regarding the "Record has been changed ...", if've checked the compare and found that the following would fix it:

function TOracleDataSet.CompareFieldToVariant(AField: TField; const AValue: Variant; CompareOld: Boolean): Boolean;

...

nq := VarIsNull(AValue) or
VarIsEmpty(AValue) or
{$IFDEF CompilerVersion2009} (((VarType(AValue) and VarTypeMask) = varUString) and (TrimRight(AValue) = '')) or {$ENDIF}
(((VarType(AValue) and VarTypeMask) = varString) and (TrimRight(AValue) = '')) or
(((VarType(AValue) and VarTypeMask) = varOleStr) and (TrimRight(AValue) = ''));

I've added the varOLEStr .... could you please confirm this ?

Thank you

Nils
 
Back
Top