Re: OO4O bookmarks incompatibility with Microsofts bookmarks

From: Dave Smith <scudderfish_at_my-dejanews.com>
Date: Tue, 27 Apr 1999 00:18:19 GMT
Message-ID: <7g2vo8$f8q$1_at_nnrp1.dejanews.com>


In article <3724901E.795F608A_at_swisslife.ch>,   "Stephan Schönberger" <stephan.schoenberger_at_swisslife.ch> wrote:
> We are using the Apex True DBGrid PRO control version 6.0. This control has an
> event which gets fired, when a new row gets fetched:
> Private Sub TDBGridProcesses_FetchRowStyle(ByVal Split As Integer, Bookmark As
> Variant, ByVal RowStyle As TrueDBGrid60.StyleDisp)
> This bookmark supports all types of Microsoft standards (ADO, RDO, etc.).
>
> normally within this event you would do the following:
>
> Set rs = Data1.Recordset.Clone
> rs.Bookmark = Bookmark
>
> with Oracle:
>
> Dim OraDynaset As OraDynaset
>
> Set OraDynaset = ORADC1.Recordset
> OraDynaset.Bookmark = Boomark
>
> which doens't work for the reasons explained.
>
> Oracle mentions that this bookmarks are not compatible, but can they be
> converted?
>
> Regards,
> Stephan
>

I'm afraid I think you are out of luck. To be honest, I don't have experience of the control you are using, and it is not one of the ones Oracle have tested with OO4O, but there is something similar in the readme (OO4O 8.1.5) I quote :-



Microsoft Data Bound Grid control

Whenever the Data Control’s underlying Recordset is moved to EOF or BOF, the grid will not paint properly if the user attempts to use it while in that state. So, each time you are finished using ORADC1.Recordset in your code it is advisable to check for BOF and EOF, and if it true, do a MoveFirst followed by a MoveLast in the case of EOF or MoveLast followed by MoveFirst in the case of BOF. This will cause the rows to be repainted.

The Scroll (DBGRID.Scroll) method of the grid will not work.

The Refresh (DBGRID.Refresh) method of the grid will not work. Use ORADC.Recordset.Refresh instead.

Deleting a row using the delete key on the keyboard causes the current row to jump ahead 2 rows rather than one. Workaround is to use a button associated with the code ORADC.Recordset.Delete.

MSGRID bookmarks (DBGRID.Bookmark) and Oracle Objects bookmarks (ORADC.Recordset.Bookmark) are not compatible. Setting the ORADC.Recordset.Bookmark property to a bookmark obtained from DBGRID.Bookmark will result in an OIP-4121. Similarly, populating the grid’s SelBookmarks collection with bookmarks obtained from ORADC.Recordset.Bookmarks will result in some rows not properly selected.

To workaround the problem, do not share bookmarks between Oracle Objects and the MSGrid.

That is, only set DBGrid1.Bookmark property to a bookmark that you obtained from DBGrid1.Bookmark. Only set ORADC.Recordset.Bookmark to a bookmark that you obtained from ORADC.Recordset.Bookmark.

For example, use:

DBGrid1.Bookmark = DBGRID.SelBookmarks(0)

instead of

ORADC.Recordset.Bookmark = DBGRID.SelBookmarks(0)


I would guess that the bookmarks are some internal data format and that there is no real possibility of converting between them. Is this going to be a show stopper? If it is then your options boil down to replace your control or replace Oracle. Sorry I can't be anymore helpful than that.

--
Regards,
Dave

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    
Received on Tue Apr 27 1999 - 02:18:19 CEST

Original text of this message