rstest.Open "test", constr, adOpenDynamic, adLockOptimistic, adCommandTableDirect
aashishn86, you cannot use named parameters without first declaring them.
Try
rstest.Open "test", constr, 2, 3, 512
See here for more numeric values.
Alternatively, you can declare the variables first. like so:
DIM adOpenDynamic, adLockOptimistic, adCommandTableDirect
adOpenDynamic = 2
adLockOptimistic = 3
adCommandTableDirect = 512
Then you can use the named arguments in your open stmt.