tags:

views:

21

answers:

2

Using DAO out of VB6:

db.OpenRecordSet("Table1", dbOpenTable, 0, dbPessimistic)

If the third argument is set to 0, as in the above, what is its effect? 0 is not a listed value for this argument in the documentation.

EDIT: What sort of recordset will be opened if 0 is given as the third argument?

+2  A: 

Have a look here, http://msdn.microsoft.com/en-us/library/bb225802%28office.12%29.aspx

d_schnell
+1 Passing `0` is equivalent to not passing any options.
MarkJ
And what will happen if no options are passed for this argument?
Craig Johnston
A: 

This is the Options argument. Passing 0 is equivalent to not passing any options at all.

Look at the manual page linked by d_schnell: all the constants have non-zero values.

You can also check the values directly in the VB6 IDE. Type one of the supported values in a code window, like dbAppendOnly. Put the cursor on the word and press Shift+F2. The object browser opens up, with a list of all the constants. They all have non-zero values (values are shown at the bottom of the object browser).

MarkJ