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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visual Basic COM Component Returns Record Set as a Variant

Status
Not open for further replies.

sut

Programmer
Jun 6, 2001
12
0
0
US
Hi
In my application, I call Visual Basic COM Component from ASP file.

The component returns a recordset as a variant.

Some part of the code for component is like
Public Function Return_Record() As Variant
Dim Sql As New ADODB.Command
Dim myconnection As New ADODB.Connection
Dim RS as new Recordset
Dim varconnection
Dim delete_status As String

On Error GoTo Error_Message 'Error_Message

myconnection.Open (mvarConnection_String)

MsgBox " before insert "
number = mvarNumber
With Sql
.ActiveConnection = mvarConnection_String
.CommandType = adCmdStoredProc
.CommandText = "SP_Get_News"
.Parameters.Append .CreateParameter("@number", adInteger, adParamInput, 4, mvarNumber)
End With
RS=Sql.execute
Return_Record = RS

MsgBox " after insert, before delete"

-------
--------
--------
---------


end function


In ASP, I will create an instance of the object and call the above function and assign the returned data to a variable of the type record set.
I want to access it as a record set. If the function in Visual Basic component returns a record set as a variant, can I access it as a record set in a ASP?
How do you do it?

Waiting for suggestions

Thanks
Smita


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top