INFO: Understanding Dynamic Resultset Cursors -RDOLast reviewed: March 20, 1997Article ID: Q149057 |
The information in this article applies to:
SUMMARYThis article discusses some advanced topics regarding RDO Dynamic cursors that are not explained in the Visual Basic documentation. Use it as a supplement to Understanding Cursors and Choosing a Cursor Type found in the Visual Basic online Help by doing an indexed find on the keyword Cursors. Use the Visual Basic online Help and the Building Client/Server Applications guide to get more general information on the different types of RDO cursors.
MORE INFORMATIONDynamic cursors have no fixed membership of rows. As you move from one rowset to another (number of rows in a rowset is determined by the RowsetSize property), the driver may return any set of rows. This new rowset might include new rows added to the table that happen to match the where clause, but it's hard to know where the new rows will actually show up (maybe at the end). RDO only goes back to the server when it needs another rowset of data (again, number of rows in a rowset is determined by the RowsetSize property), so changes by other users won't show up until the rowset boundary is crossed. Adjusting the RowsetSize property is done to balance performance against freshness of data. Because frequent trips to the server are very expensive, it is not advisable, in a client/server environment where a network is involved, to ping back to the server every time you move to a new row - the Jet database engine does this and it is not as fast as RDO across the network. Bookmarks are not supported in Dynamic cursors - the Bookmarkable property will always be false for a dynamic cursor. The SQL Server driver doesn't give bookmarks in dynamic cursors because there is no immutable row id in SQL Server. Bookmarks work within rowsets but not across them, so the Bookmarkable property is set to false. SQL Server cannot be implemented like an ISAM database. The design goal is to make a client/server system scalable. RDO allows you to refresh data constantly by setting the RowsetSize = 1, but this results in network round- trips (by definition) every time you move, and hinder you on a slower network or when many users are on the system. This is not an efficient way to implement client/server programming, and no DBMS or development tool can address the fact that network round-trip's takes time. RDO uses ODBC without introducing any magic on top, which is why it is both fast and small.
Sample ProgramThis example describes how to set up a dynamic rdoResultset. It uses a DSN-less ODBC connection so it is not necessary to set up a DSN with the ODBC Admin utility.
REFERENCESFor more information on this topic, please see the following: ODBC 2.0 Programmer's Reference and SDK Guide Building Client/Server Applications with Visual Basic Hitchhiker's Guide to Visual Basic and SQL Server, Microsoft Press. ISBN: 1-55615-906-4. |
Keywords : APrgDataODBC APrgDataOther kbprg vb4win vb5all vb5howto kbhowto
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |