Subject Re: [IBO] How open a dataset with only a Bookmark record?
Author Helen Borrie
At 01:52 PM 16/03/2003 +0000, you wrote:
>Thanks Helen, but I don't have params in my query.
>I have a simple select without WHERE, and the user enters the search
>criteria and locates the record(s) he wants.
>Now, I want the possibility to open the same form on a specific row,
>the same as another (lookup) dataset (i.e. the user is working on
>customer's orders, with a lookup dataset on customers table. Then he
>selects a row and press F7, then the Customer edit form pops and that
>customer data show. So I want to bring the Bookmark of the lookup on
>customer table and use it to open the customer editing form).
>Would be great having a method like "BookmarkToSearch" that fills the
>search criteria with the bookmark values, so I only have to pass a
>string (bookmark) to the form.
>I'm trying to use a protected method: SetBufferBookmark(bookmark)
>I don't know if it's the right direction, but I've got a strange error
>(ok, it's not IBO related, but...)
>// just to access protected methods
>TIB_Protected_BDataset = class(TIB_BDataset);
>// this works as expected...
> with (FBaseDataSource.DataSet as TIB_BDataset) do
>// this raises an "Invalid Class TypeCast"
> with (FBaseDataSource.DataSet as TIB_Protected_BDataset) do
>D6, SP3.
>really s trange, isn't it?

No, it's not strange. If FBaseDataSource.DataSet is pointing to a
TIB_Query. TIB_Protected_BDataset won't be in TIB_Query's ancestry, will it?