Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Empty recordset from ASP page??

Status
Not open for further replies.

usp004

ISP
Jul 10, 2000
46
US
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??
 
It seems that fa_get_header_info is a stored procedure. So why are you using adCmdText?


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top