S
Sudhakar Sankar
Hi all,
I am using a COM+ component to fetch the Recordset from the database.
My coding is as follows:
' ------ In COM+ Application --------------
Function executeResultQuery(Con as Connection, qry as String) As
Object
dim oRs as New ADODB.Recordset
oRs.open qry, con
Set executeResultQuery = oRs
End Function
'------- In ASP Page
<%
Set obj=Server.CreateObject("myProj.MyClass")
Set con=Server.CreateObject("ADODB.Connection")
con.open "mydsn","",""
sql = "select * from students"
Set rs = obj.executeResultQuery(con,sql) <--- Error raised here
While not rs.eof
response.write(rs(0))
rs.movenext
Wend
%>
At the time of processing the ASP page, i am getting the following
error:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'executeResultQuery'
/remote/sample1.asp, line 16
What is the problem here?
I changed in COM+ application as "Recordset" from "Object" for the
return type. No luck.
Advise appreciated.
Thanks & regards,
S.Sudhakar Sankar.
I am using a COM+ component to fetch the Recordset from the database.
My coding is as follows:
' ------ In COM+ Application --------------
Function executeResultQuery(Con as Connection, qry as String) As
Object
dim oRs as New ADODB.Recordset
oRs.open qry, con
Set executeResultQuery = oRs
End Function
'------- In ASP Page
<%
Set obj=Server.CreateObject("myProj.MyClass")
Set con=Server.CreateObject("ADODB.Connection")
con.open "mydsn","",""
sql = "select * from students"
Set rs = obj.executeResultQuery(con,sql) <--- Error raised here
While not rs.eof
response.write(rs(0))
rs.movenext
Wend
%>
At the time of processing the ASP page, i am getting the following
error:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'executeResultQuery'
/remote/sample1.asp, line 16
What is the problem here?
I changed in COM+ application as "Recordset" from "Object" for the
return type. No luck.
Advise appreciated.
Thanks & regards,
S.Sudhakar Sankar.