Print Thread
Page 1 of 2 1 2
OracleDataset.Filter
#45664 01/15/13 08:01 PM
Joined: Feb 2005
Posts: 49
A
Member
OP Offline
Member
A
Joined: Feb 2005
Posts: 49
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<''9'''; //return true if MyField = 10, or 23, or 899!

Could you check this painful behavior?
Thank you
Alberto Pilat


Re: OracleDataset.Filter
Alberto Pilat #45671 01/16/13 09:23 AM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
[quote]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';[/quote]

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;

[quote]
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<''9'''; //return true if MyField = 10, or 23, or 899!
[/quote]
If you use a string expression the comparison needs to be performed as strings. All numbers can be converted to strings, but not all strings can be converted to numbers.


Marco Kalter
Allround Automations
Re: OracleDataset.Filter
Marco Kalter #45686 01/17/13 07:01 AM
Joined: Feb 2005
Posts: 49
A
Member
OP Offline
Member
A
Joined: Feb 2005
Posts: 49
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

Re: OracleDataset.Filter
Alberto Pilat #45687 01/17/13 07:23 AM
Joined: Feb 2005
Posts: 49
A
Member
OP Offline
Member
A
Joined: Feb 2005
Posts: 49
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.

Re: OracleDataset.Filter
Alberto Pilat #45689 01/17/13 10:25 AM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
We'll investigate...


Marco Kalter
Allround Automations
Re: OracleDataset.Filter
Marco Kalter #45740 01/22/13 04:36 AM
Joined: Jan 2013
Posts: 1
D
Member
Offline
Member
D
Joined: Jan 2013
Posts: 1
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

Re: OracleDataset.Filter
DmLam #45761 01/23/13 04:01 PM
Joined: Feb 2005
Posts: 49
A
Member
OP Offline
Member
A
Joined: Feb 2005
Posts: 49
I don't have source, so I can't verify the fix of DmLam.
Some news from Allround?

Re: OracleDataset.Filter
Alberto Pilat #46039 02/12/13 11:48 AM
Joined: Feb 2005
Posts: 49
A
Member
OP Offline
Member
A
Joined: Feb 2005
Posts: 49
Excuse me Marco, but I need some reply from you.
Have you reproduced the error as I described in first post?

Re: OracleDataset.Filter
Alberto Pilat #46041 02/12/13 02:45 PM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
Yes we have. We'll have a fix shortly.


Marco Kalter
Allround Automations
Re: OracleDataset.Filter
Marco Kalter #46569 03/19/13 05:44 PM
Joined: Feb 2005
Posts: 49
A
Member
OP Offline
Member
A
Joined: Feb 2005
Posts: 49
Hello Marco,
is the fix available?
thanks

Page 1 of 2 1 2

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.038s Queries: 15 (0.013s) Memory: 2.5624 MB (Peak: 3.0427 MB) Data Comp: Off Server Time: 2024-05-18 20:50:38 UTC
Valid HTML 5 and Valid CSS