Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Please help: Problem with EDBQuery & DataSetProvider
Sun, Nov 25 2007 10:59 PMPermanent Link

"Trevor Keegan"
Hi,

I am just getting started on a new application and I was wanting to use the
TClientDataSet, TDataSetProvider and the EDBQuery & EDBUpdateSQL.

Basically all that I have done is:
1. Put down a TClientDataSet, TDataSetProvider & TEDBQuery
2. Set the SQL property on the EDBQuery & Open the query
3. Set the DataSet property of the DataSetProvider to point to the Query
4. Set the ClientDataSet.Provider.Name to the name of the Provider

When I open the ClientDataSet I am told there is a 'Catestophic Failure' (as
far as I have been able to work out, the DataSetProvider is trying to send a
NULL back)

The other thing is, that if I change the TEDBQuery for a TEDBTable, and keep
eveything else the same....then everything works, and I get data in the
ClientDataSet.

Is there something that I am doing wrong in my setup, or is this a Bug.  I
am using C++ Builder 6, with EDB V1.06b1

Regards
Trevor Keegan

Mon, Nov 26 2007 12:10 AMPermanent Link

"Trevor Keegan"
Hello,

Doing a little more experimenting,  I find that if I do not open the
ClientDataSet (using ClientDataSet->Open), instead I direcly call the
provider (i.e. ClientDataSet->Data = ClientDataSet->DataRequest(
"MyRequest" ); ) then everything works as I expect.

Regards
Trevor Keegan

Wed, Nov 28 2007 8:56 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Trevor,

It's a bug.  Use this as a fix in edbcomps.pas:

procedure TEDBDataSet.PSReset;
begin
  inherited PSReset;
  if (FHandle <> nil) then  // New
     FHandle.Refresh;
end;

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, Nov 29 2007 7:06 PMPermanent Link

"Trevor Keegan"
Thanks Tim,

I will give that a shot.

Regards
Trevor Keegan

Image