szConfigString = "Provider = SQLOLEDB;Data Source = " & gsz_IPSOURCE & ";User Id='****'; Password ='********';"
sql = "USE ManatronWheelerCustom "
sql = sql & "SELECT * FROM TaxDistrictRates "
sql = sql & "WHERE "
sql = sql & "area = '" & szArea & "' "
sql = sql & "AND tax_year > " & iBaseYear & " "
sql = sql & "order by tdl.tax_year desc;"
db.Open szConfigString
rstax.Open sql, db, adOpenKeyset, adLockReadOnly
rstax.MoveFirst ' creates error
The sql is correct and returns the expect records in SSMS
The RECORDSET IS OBVIOUSLY OPEN
Why then does the error
Quote
Operation is not allowed when the object is closed.
appear? I have used this code forever and works fine everywhere else.
Whiskey Tango Foxtrot over?
TIA

New Topic/Question
Reply



MultiQuote






|