Get the error "ADODB.Recordset error '800a0e7d' "
I'm trying to connect to an Access database and retrieve data. I'm getting the folloring error message:
ADODB.Recordset error '800a0e7d'
The connection cannot be used to perform this operation. It is either closed or invalid in this context.
/legco/script/common.inc, line 52
The code used is as follows:
sRSSource will input a SQL
Function GetRecordset(sRSSource)
Dim objRSGetRecordset
Set objRSGetRecordset = Server.CreateObject("ADODB.RecordSet")
'' objRSGetRecordset.Open sRSSource, cnn, adOpenStatic, adLockOptimistic
objRSGetRecordset.Open sRSSource, cnn, adOpenStatic, adLockReadOnly
Set GetRecordset = objRSGetRecordset
'objRSGetRecordset.Close
Set objRSGetRecordset = Nothing
End Function
Any help or suggestion is much appreciated!
thanks...
Raymond
|