change lockType for all recordsets

04-20-2004, 09:43 AM
has anyone a idea how i could change the proporties of locktype for all the recordsets in 1 time

im using ado

instead off putting
rs1.LockType = adLockOptimistic
rs2.LockType = adLockOptimistic
rs3.LockType = adLockOptimistic
rs4.LockType = adLockOptimistic
rs5.LockType = adLockOptimistic
into my program

i would like something like
for each recordset in project
recordset.LockType = adLockOptimistic

i also have the same problem with this prop:
rs1.CursorType = adOpenStatic
rs2.CursorType = adOpenStatic
rs3.CursorType = adOpenStatic

thx in advance

04-20-2004, 10:39 AM
When you .Open a recordset, you have those as optional parameters, no? Why not use them there?

04-20-2004, 12:19 PM
I believe you would have to use a collection for this. And, really, I don't see the benefit :). When you open each individual recordset, just add the parameter.

04-21-2004, 08:48 AM
thx guys, i knew there had to be an easy way for that :D :D

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum