Dynasets vs. Snapshots in Microsoft Visual Basic

Visual Basic uses the same two methods of retrieving data: dynasets and snapshots.

  • DYNASETS
    When data is retrieved with a dynaset, the primary key value for every record in your selection is returned first. Based on these keys, one additional query per row is issued to retrieve the selected columns for that row. The end result is that for a query that retrieves 100 rows, 101 SQL requests are sent to the server - one request to retrieve the primary keys for the query, and one additional request per row to retrieve the selected columns.

Advantages

    • The user can quickly jump to the bottom of a result set without retrieving the data rows in the middle of the query.

    • The user can refresh the viewed data by creating a second query based on the primary keys retrieved initially.

    • The user can add, modify, or delete a row of data based on the primary keys retrieved initially.

Disadvantages

    • Much slower than snapshots.

    • Network traffic is greater than snapshots.

 

  • SNAPSHOTS
    When data is retrieved with a snapshot, the data is retrieved in one pass, and the results are stored locally on your computer.

Advantages

    • Faster than dynasets because the data is retrieved in one pass.

    • Network traffic is lower than with dynasets.

Disadvantages

    • The user cannot refresh or modify the viewed data. The viewed data represents the state of the data at the time of retrieval.