OracleDataset.Filter

Hello,
I'm using DXE3 with 4.1.3, installed brand new some days ago.
Trying to compile my D2010 applications, I've found this problem:
when applying Filter property containing some number without quote, the application crash (no messages, it seems into endless loop).
e.g.:
dataset.filter:='1=1'; //always true condition
or
dataset.filter:='MyField=345';

even if filtered = false, the application crash when filter property is assigned.

If i use number between quote it works, but the codition is evalueted in alphanumeric context, even if the field is numeric!
dataset.filter:=''1''=''1''';
dataset.filter:='MyField=''345''';
dataset.filter:='MyField
 
I'm using DXE3 with 4.1.3, installed brand new some days ago.
Trying to compile my D2010 applications, I've found this problem:
when applying Filter property containing some number without quote, the application crash (no messages, it seems into endless loop).
e.g.:
dataset.filter:='1=1'; //always true condition
or
dataset.filter:='MyField=345';

This works fine for me. I tested this with the DeptEmp demo project and used the following code:

DeptDataSet.Filter := 'deptno=10';
DeptDataSet.Filtered := True;

If i use number between quote it works, but the codition is evalueted in alphanumeric context, even if the field is numeric!
dataset.filter:=''1''=''1''';
dataset.filter:='MyField=''345''';
dataset.filter:='MyField
 
Well,
I'm trying with this stupid statement:
SELECT 1 AS FIELDNUMBER FROM DUAL UNION
SELECT 2 FROM DUAL UNION
SELECT 3 FROM DUAL UNION
SELECT 4 FROM DUAL

setting
Dataset.Filter:='FIELDNUMBER > 2';
the application crash...

where I can find the DeptEmp demo project?
Thanks
 
I've found the demo project and done your test. It crash...
Note that no exception is generated, simply the application is locked.
While if i write some wrong expression, a syntiax errror is shown.
I'm using Delphi XE3 with DOA 4.1.3.3, I tried either the trial version and the licensed one.
Other dataset like TClientDataSet or 'DAC for MySQL' work fine...
Please check it better, I can't use my application with this bug.
 
A have alike situation when using an expression in Filter property like

parent_id = 0

Seems like the problem is in unit OracleFilter in the UnsignedFloat function:

{$IFDEF CompilerVersionXE3}
if P^ = SysUtils.FormatSettings.DecimalSeparator then
{$ELSE}
if P^ = SysUtils.DecimalSeparator then
{$ENDIF}
if True then // PROBLEM IS HERE
begin
if State = nsMantissa then

Simply delete the marked line and everything will work fine
 
Yes, this will be available as a 4.1.3.4 patch shortly. It will be the exact same version that you have now.
 
Back
Top