Page 1 of 1

Does Unidac DataSets implement IProviderSupport?

Posted: Fri 28 Jan 2011 00:39
by kamiller42
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.

Posted: Fri 28 Jan 2011 11:29
by AlexP
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]

Posted: Fri 28 Jan 2011 17:28
by kamiller42
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

Posted: Mon 31 Jan 2011 14:45
by AndreyZ
We are investigating this question.