Current recordset does not support updating in vb6 is hanging out and dating the same thing

Tip: Including the Not operator is a matter of efficiency.

If you expect the Recordset to contain records most of the time, it's more efficient to include Not in the check.

For instance, the following code returns an error when the Move Next method moves beyond the last record: As long as EOF equals False, meaning the current position is a valid record, this loop executes the If statement.

Once the EOF property is True, the check eliminates the error that would otherwise occur by bypassing the Move Next method in the loop.

Use a static or keyset cursor to return a true record count in an ADO Recordset.

When using DAO, you must remember to populate (fully) the Recordset before counting, as follows: 0 Then DAO populates with records as they are needed, and consequently, its Record Count property considers only the records already accessed.

When encountering a multivalue field, you must add a loop to cycle through the values.

In fact, DAO and ADO use the Recordset object to represent a multivalue field.Referencing both libraries is likely to generate an ambiguous object error.To avoid this type of error, give priority to the library that your code references the most.The previous technique uses BOF and EOF to expose an empty Recordset before code can generate an error.Another way to avoid this type of error is to use the Record Count property to count the records as follows: This statement is a bit unpredictable with ADO because some ADO Recordset objects return -1 as the count.

Leave a Reply