Subject TIBOQuery with TDataSetProvider
Author Walter Ogston
Dear Friends,

With D7 Ent I am using a TDataSetProvider to link TIBOQuery to
TClientDataset, over a SOAP connection. Here is the .dfm code for the
remote data module:

object DataSetProvider1: TDataSetProvider
DataSet = IBOQuery1
Options = [poAllowCommandText]
Left = 368
Top = 352
end
...
object IBOQuery1: TIBOQuery
Params = <>
IB_Connection = IBODatabase1
IB_Transaction = IBOTransaction1
RecordCountAccurate = True
SQL.Strings = (
'')
FieldOptions = []
Left = 280
Top = 304
end
object IBOTransaction1: TIBOTransaction
IB_Connection = IBODatabase1
AutoCommit = True
Isolation = tiCommitted
Left = 192
Top = 304
end

and in the client datamodule:

object ClientDataSet1: TClientDataSet
Aggregates = <>
Params = <>
ProviderName = 'DataSetProvider1'
RemoteServer = SoapConnection1
Left = 112
Top = 308
end

Now in code I do:
with fDataMod.ClientDataSet1 do begin
Active := False;
fDataMod.ClientDataSet1.CommandText := Trim(mmoSQL.Lines.Text);
Active := True;
end;

The first time I execute this, everything works as expected.

Then I change the SQL string and execute this code again, and on the
statement Active := False; I get ERemotableException with message 'Blank
SQL Statement not allowed'.

The third time, the Active := False statement doesn't cause any problem
(the dataset is already inactive) but on the Active := True statement, the
old result set appears in the ClientDataSet - the query is not updated to
the new SQL.

This all worked in an earlier version using TIBQuery and TIBTransaction in
place of the IBO components.

Am I doing something wrong, or failing to do something right, or is this
kind of thing beyond the capabilities of the IBO TDataset descendents?

Thanks,

Walter

/*----------------
C. Walter Ogston
ogstoncw@... Kalamazoo, Michigan
*/