Is there a way to remove the validation of dynamic where

I want to run a query and put a field in the where clause which is not part of the select fields.
It is a GROUP BY select. I cannot add the field to the select without changing the result.
I get a ‘validation of dynamic where’ error.
Can this be avoided?

Hi,

for usual tables (i.e. non-DASQL requests), you can set DataService.AllowAllFieldsInDynamicWhere to True

From which version should AllowAllFieldsInDynamicWhere be available?
I don’t see this property in my v10.0.0.1521

Hi,

This property was added since DA 6.0.45.821 in 2009 year.

Check DataAbstractService_Impl.pas:

TDataAbstractService = class(TBaseDataAbstractService,
...
  published
...
  property AllowAllFieldsInDynamicWhere: Boolean read fAllowAllFieldsInDynamicWhere write fAllowAllFieldsInDynamicWhere default False;

I have a .NET RO server (it’s called from a delphi client).
Does that component have that property/capability?

Hi,

Looks like only Delphi-based server has this property and .NET-based server doesn’t

Logged as bugs://D19225.

bugs://D19225 was closed as fixed.