What is the difference between a Dynaset and Snapshot and
how would you create one?

Answers were Sorted based on User's Feedback



What is the difference between a Dynaset and Snapshot and how would you create one?..

Answer / george

All Recordset objects are constructed using records (rows)
and fields (columns). There are five types of Recordset
objects:

Table-type Recordset ::
********************
representation in code of a base table that you can use to
add, change,or delete records from a single database table
(Microsoft Jet workspaces only).

Dynaset-type Recordset ::
**********************
the result of a query that can have updatable records. A
dynaset-type Recordset object is a dynamic set of records
that you can use to add, change, or delete records from an
underlying database table or tables.
A dynaset-type Recordset object can contain fields from one
or more tables in a database. This type corresponds to an
ODBC keyset cursor.

Snapshot-type Recordset ::
**********************
a static copy of a set of records that you can use to find
data or generate reports. A snapshot-type Recordset object
can contain fields from one or more tables in a database
but can't be updated. This type corresponds to an ODBC
static cursor.

Forward-only-type Recordset::
***************************
identical to a snapshot except that no cursor is provided.
You can only scroll forward through records. This improves
performance in situations where you only need to make a
single pass through a result set. This type corresponds to
an ODBC forward-only cursor.

Dynamic-type Recordset ::
**********************
a query result set from one or more base tables in which
you can add,change, or delete records from a row-returning
query. Further, records other users add, delete, or edit in
the base tables also appear in your Recordset. This type
corresponds to an ODBC dynamic cursor (ODBCDirect
workspaces only).

Is This Answer Correct ?    10 Yes 1 No

What is the difference between a Dynaset and Snapshot and how would you create one?..

Answer / suresh

A dynaset-type Recordset object is a dynamic set of records
that can contain fields from one or more tables or queries
in a database and may be updatable. In an ODBCDirect
database, a dynaset-type Recordset object corresponds to an
ODBC keyset cursor.
Remarks
A dynaset-type Recordset object is a type of Recordset
object you can use to manipulate data in an underlying
database table or tables.
It differs from a snapshot-type Recordset object because
the dynaset stores only the primary key for each record,
instead of actual data. As a result, a dynaset is updated
with changes made to the source data, while the snapshot is
not. Like the table-type Recordset object, a dynaset
retrieves the full record only when it's needed for editing
or display purposes.

A snapshot-type Recordset object is a static set of records
that you can use to examine data in an underlying table or
tables. In an ODBCDirect database, a snapshot-type
Recordset object corresponds to a static cursor.
Remarks
To create a snapshot-type Recordset object, use the
OpenRecordset method on an open database, on another
dynaset- or snapshot-type Recordset object, or on a
QueryDef object.

Is This Answer Correct ?    9 Yes 2 No

Post New Answer

More Visual Basic Interview Questions

What is ODBC Direct and Microsoft Jet Database Engine ?

0 Answers  


what are the Types of Resultsets?

0 Answers  


How many tabs in a tabbed dialog do you consider appropriate?

0 Answers  


Does VB support pointers to functions?

0 Answers  


How good are you in VB?

2 Answers   Satyam,






Are there any examples of commercial applications built using Visual Basic?

0 Answers  


What is ADO?

1 Answers   Satyam,


What is dao in vb?

0 Answers  


What is the difference between Object and Class?

6 Answers  


Is the Variant type slower than using other variable types?

0 Answers  


Is visual basic still used?

0 Answers  


What is the difference between a Dynaset and Snapshot and how would you create one?

2 Answers  


Categories