RaiseForwardOnlyException in AbstractResultSet

The forum for ZeosLib 7.2 Report problems. Ask for help, post proposals for the new version and Zeoslib 7.2 features here. This is a forum that will be edited once the 7.2.x version goes into RC/stable!!

My personal intention for 7.2 is to speed up the internals as optimal a possible for all IDE's. Hope you can help?! Have fun with testing 7.2
Post Reply
louis
Expert Boarder
Expert Boarder
Posts: 107
Joined: 02.01.2009, 19:41

RaiseForwardOnlyException in AbstractResultSet

Post by louis »

Hallo,
I need a TStoredProc with a property "DataSource" published because I have a framework that use this property to gain MasterTable in TDataModule.

Because TStoredProc not provide property "DataSource" I derived a new component TmxZStoredProc with only add property "DataSet" like this:

Code: Select all

type
  TmxZStoredProc = class(TZStoredProc)
  published
    { Published declarations }
    property DataSource;
  end;
If I connect the property "DataSource" of this new component to a ZReadOnlyDataset or derived when I go Next or previous record, and mxZStoredProc is Active, is raised the ForwardOnly Exception in row 731 of ZDbcResultSet.pas.

There is a possibility to avoid this?

I compiled with revision TRUNK 7.2.0.3882

Thanks
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1918
Joined: 17.01.2011, 14:17

Re: RaiseForwardOnlyException in AbstractResultSet

Post by marsupilami »

Hello louis,

which database do you use (Firebird, PostgreSQL, Sybase, sqlite, ...) and which version of that database? I am not si used to using the DataSource Property but if I understand it correctly it is meant to be used in a master-slave scenario. Does the TZStordProc already provide the necessary fields for the synchronization that is necessary?

With best regards,

Jan
louis
Expert Boarder
Expert Boarder
Posts: 107
Joined: 02.01.2009, 19:41

Re: RaiseForwardOnlyException in AbstractResultSet

Post by louis »

marsupilami wrote:which database do you use (Firebird, PostgreSQL, Sybase, sqlite, ...) and which version of that database?
Database is Firebird, version is 2.5.5.
I am not si used to using the DataSource Property
I need to use "Datasource" property because I need to retrieve the Master-Dataset in a scenario Master-Detail. I used ZStoredProc to show a lot of detail rows because with a query is not possible obtain a particular sum (progressive sum) of a fields.
Does the TZStordProc already provide the necessary fields for the synchronization that is necessary?
I don't know that, I see that the ancestor of TZStoredProc is TZAbstractDataset but I don't know enough. I only exposed "DataSource" property and I use it in a recoursive function to get the main Master-DataSet of DataModule via DBAction for display purpose.

Thanks.
louis
Expert Boarder
Expert Boarder
Posts: 107
Joined: 02.01.2009, 19:41

Re: RaiseForwardOnlyException in AbstractResultSet

Post by louis »

Hello,
ok, I am a novice in FB and I will understand it :)

I discovered that I can do a "select * from MyStoredProc" within the property SQL of a ZReadOnlyQuery.

With this I solved my problem (find the master DataSource of DataModule) and I had semplified my code because in this case I can get the parameter for the StoredProc automatically from linked DataSource (master) without programmatically.

Thanks.
Post Reply