I'm with the others who are suggesting biting that bullet and updating to ADO.NET - especially as you are already spending ages trying to overcome the problems caused by using out-of-date technology.
However, try the following to see if it gets you over your hump..
1. I'm pretty sure it's the Lock type that is generating the error so, instead of
ADODB.LockTypeEnum.adLockOptimistic
, try
rstGyles.LockType = adLockOptimistic
Alternatively try putting
ADODB.LockType.
and see what comes up with intellisense OR using
rstGyles.Open("SELECT * FROM bzGyle ORDER BY gNo DESC", conn3)
and confirm that the error goes away.
2. Try explicitly quoting the cursor type as
adOpenDynamic
rather than the default