I have a vb dll which contains a function with a adodb.recordset datatype. When I try to fetch this recordset from my asp page I get 0 records, yet if I run this from within the dll I get records back?
Here is some of the dll code(minus error handling):
Public Function get_tenexheaderinfo(strSessionID As String) As ADODB.Recordset
Dim rs As ADODB.Recordset
Dim cn As ADODB.Connection
Set rs = New ADODB.Recordset
Set cn = New ADODB.Connection
cn.CursorLocation = cn.Open gConnectString
rs.Open "fa_get_header_info", cn, adOpenStatic, adLockReadOnly, adCmdText
Set rs.ActiveConnection = Nothing
Set get_tenexheaderinfo = rs
end function
----------------------------------------------------------
Here is how I call it in the ASP page:
Set rs = Server.CreateObject("ADODB.RecordSet"
set rs = ObjReference.get_tenexheaderinfo("XX"
if rs.eof and rs.bof then
response.write "EMPTY"
response.end
else
rs.MoveFirst
response.write rs.Fields(0).Value
rs.Close
set rs = nothing
end if
..........
................It always enters the eof/bof clause?? Can someone help??
Here is some of the dll code(minus error handling):
Public Function get_tenexheaderinfo(strSessionID As String) As ADODB.Recordset
Dim rs As ADODB.Recordset
Dim cn As ADODB.Connection
Set rs = New ADODB.Recordset
Set cn = New ADODB.Connection
cn.CursorLocation = cn.Open gConnectString
rs.Open "fa_get_header_info", cn, adOpenStatic, adLockReadOnly, adCmdText
Set rs.ActiveConnection = Nothing
Set get_tenexheaderinfo = rs
end function
----------------------------------------------------------
Here is how I call it in the ASP page:
Set rs = Server.CreateObject("ADODB.RecordSet"
set rs = ObjReference.get_tenexheaderinfo("XX"
if rs.eof and rs.bof then
response.write "EMPTY"
response.end
else
rs.MoveFirst
response.write rs.Fields(0).Value
rs.Close
set rs = nothing
end if
..........
................It always enters the eof/bof clause?? Can someone help??