Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread cxGrid and DBISAM
Tue, Nov 16 2010 12:34 PMPermanent Link

Christian

I have a table named "Holiday" with a field called "Date". I put a DevExpress TcxGrid and a TcxNavigator on the form and run the application. With the Navigator I am able to create a filter by expression but this results in the error # 10051.

I am able to reproduce that error every time: "Error # 10051, Expected column name but instead found [Holiday.Date] in filter expression at line 1, column2"

This is more or less a "hello world" program applied to the dbisam and the DevExpress cxGrid.So I would assume that something simple should work ... means the error is somewhere on my side ... but where can I look next.

Any hints appreciated.

Christian
Tue, Nov 16 2010 2:19 PMPermanent Link

Rita Tipton

As the navigator is no doubt linked to a datasource
it will look for a field named date and not the table
Holiday.Date                                    Maybe..............
HTH
Rita

"Christian Holzner" wrote in message
news:A9FC41D7-DB4D-4E55-AF88-F31F6AE1D8C5@news.elevatesoft.com...

I have a table named "Holiday" with a field called "Date". I put a
DevExpress TcxGrid and a TcxNavigator on the form and run the application.
With the Navigator I am able to create a filter by expression but this
results in the error # 10051.

I am able to reproduce that error every time: "Error # 10051, Expected
column name but instead found [Holiday.Date] in filter expression at line 1,
column2"

This is more or less a "hello world" program applied to the dbisam and the
DevExpress cxGrid.So I would assume that something simple should work ...
means the error is somewhere on my side ... but where can I look next.

Any hints appreciated.

Christian
Wed, Nov 17 2010 1:57 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Christian,

<< With the Navigator I am able to create a filter by expression but this
results in the error # 10051.

I am able to reproduce that error every time: "Error # 10051, Expected
column name but instead found [Holiday.Date] in filter expression at line 1,
column2"  >>

If you're specifying the filter as:

Holiday.Date = 'YYYY-MM-DD'

then leave out the "Holiday." portion.  Filter expressions don't need table
correlation names in front of column names because it is always assumed that
the column is in the current table that is being filtered.

--
Tim Young
Elevate Software
www.elevatesoft.com
Thu, Nov 18 2010 6:39 AMPermanent Link

Christian

Tim,

the problem is, that the filter expression is internally built by the navigator. I contacted DevExpress and they are aware of that problem (ID: DQ36424 in their Knowledge base). They consider the problem a DBISAM limitation

"...In previous versions, the DBFilterControl did not take the Origin property into account. So the problem could not appear. But after this behavior was changed, your problem occured. At present, we have not been reported about such a problem in other database engines...."

But they also gave the following workaround ("tm100" is the component name of the DBISAM table).

procedure TForm1.cxDBNavigatorButtonsApplyFilter(Sender: TObject; AFilterControl: TcxDBFilterControl);
var
 I: Integer;
begin
 for I := 0 to tm100.FieldCount - 1 do
   tm100.Fields[I].Origin := '';
 tm100.Filter := AFilterControl.FilterText;
end;
Image