Does Unidac DataSets implement IProviderSupport?

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
kamiller42
Posts: 40
Joined: Thu 27 Jan 2011 22:31

Does Unidac DataSets implement IProviderSupport?

Post by kamiller42 » Fri 28 Jan 2011 00:39

I don't have the source code to check this, but it seems the unidac datasets partially support IProviderSupport interfaces.

Given the following code:

Code: Select all

    lDS := ActiveDataSet;
    if (lDS = dsrCustom.DataSet) then
      (lDS as IProviderSupport).PSSetCommandText(memCustom.Lines.Text);
    if (lDS as IProviderSupport).PSGetCommandText  '' then
      RefreshDataSet(lDS);
The PSGetCommandText is returning empty string even though memCustom.Lines.Text has text. It's like the SetCommandText isn't working.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Fri 28 Jan 2011 11:29

Hello,

Thank you for the information
We have reproduced the problem

The SetCommandText method works correctly, you can check it by executing the following code:

Code: Select all

(lDS as IProviderSupport).PSSetCommandText(memCustom.Lines.Text); 
(lDS as IProviderSupport).PSExecute;
But we we don't override the PSGetCommandText method in our classes, so inthis case the base PSGetCommandText method which returns an empty string is used.

We will investigate the possibility of adding this method in one of the next builds/versions.[/quote]

kamiller42
Posts: 40
Joined: Thu 27 Jan 2011 22:31

Post by kamiller42 » Fri 28 Jan 2011 17:28

Thank you for looking into this. Absent IQuery, ISqlCommand, IStoredProc interfaces, IProvider is the best way to access TDataSet descendants generically.

Do you know anything about this?
http://www.devart.com/forums/viewtopic.php?t=20132

AndreyZ

Post by AndreyZ » Mon 31 Jan 2011 14:45

We are investigating this question.

Post Reply