Hi all.
I have the folloving code in my
VB project:
Function GetRecordset(ByVal sSQL As String, ByVal oDbConnection As ADODB.Connection) As ADODB.Recordset
Dim rsObj As ADODB.Recordset
Set rsObj = New ADODB.Recordset
'To use disconnected Recordset you must use client side cursors
rsObj.CursorLocation = adUseClient
rsObj.Open sSQL, oDbConnection
Set GetRecordset = rsObj
End Function
And I'm keeping to recieve the folloving error:
error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
Error appears in the line with:
rsObj.Open sSQL, oDbConnection
GetRecordset function is called from GetData function, which is called from asp page.
Structure of GetData function goes like this:
Function GetData(ByVal oDbConnection As ADODB.Connection) As ADODB.Recordset
Dim sSQL As String
sSQL = "SELECT * FROM TABLE"
Set GetData = GetRecordset(sSQL, oDbConnection)
End Function
Then GetData function is called from asp:
Dim Conn
Dim rsTest
Set Conn = Getconn()
Set rsTest = prjTest.GetData(Conn)
' .. manipulations
Set Conn = Nothing
Set rsTest = Nothing
I tried different variants of GetRecordset and GetData functions but error doesn't dissapear.
Btw when I lanch an asp page not in
VB Debugger, everything works fine.