SDAC with infopower filter dialog

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
matjazu
Posts: 4
Joined: Fri 18 Mar 2005 10:53

SDAC with infopower filter dialog

Post by matjazu » Fri 18 Mar 2005 11:05

Hi, i have problem when using info power filter dialog with TMSQuery.
When TMSQuery is readonly=False everything works fine.
After filter is defined sql statement is created correctly.
But if TMSQuery is readonly (=true) then sql statement is not created correctly and error message is reported, for example:

Unable to execute SQL:
select * from employee where (Upper() like 'A%)

Obviously field name is missing, but that happens only when TMSQuery is read only. (where part of sql statement is created by TwwFilterDialog).
If I use TADOQuery or TQuery i don't have problem.

I use Delphi 7.1, Infopower 4000, SDAC 3.50.0.12.

Thanks for help.

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Fri 18 Mar 2005 15:08

SDAC performs optimization on opening ReadOnly queries that can cause this result.

Are you sure that your task requires using ReadOnly = True?

matjazu
Posts: 4
Joined: Fri 18 Mar 2005 10:53

Post by matjazu » Mon 21 Mar 2005 07:08

It's not absolutely neccessary, but it simplifies my code and is more robust, because if user isn't allowed to change data, I set query to read only.

Dos this optimization produces some other results that i should be aware of?

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Mon 21 Mar 2005 09:24

> Dos this optimization produces some other results that i should be aware of?

Usually, if the query doesn't have key fields but result is intended to edit OLE DB adds key fields automatically. Probably, the problem can be solved if you add key fields to the query manually.

Post Reply