R
rob
Dear All,
I have a COM+ component that returns an ADODB.Recordset. In an include file
that is included by an aspx page I assign that returned recorset to an
ADODB._Recordset. Unfortunately, this assignment breaks and after many days
I still couldn't figure out why. Therefore, any help is highly appreciated.
Note that the aspx pages were automatically converted by the MS/Artisan "ASP
to ASP.NET migration tool" which is only one small step in our full
migration path.
Here is a code snipet:
COM+ component (busData):
------------------------------
Public Function GetRecord(ByVal psItem As String) As ADODB.Recordset
Dim odbData As dbData.Data
Set odbData = GetObjectContext.CreateInstance("dbData.Data")
Set GetRecord = odbData.GetRecord(psItem) <-- VALID DATA IS RETURNED
(TESTED)
GetObjectContext.SetComplete
Set odbClient = Nothing
End Function
Include to aspx page:
---------------------
function aspGetData()
Dim oData As busData.Data
Dim oRS As ADODB._Recordset
Set oData = Server.CreateObject("busData.Data")
Set oRS = oClient.GetRecord(GsItem) <-- THIS BREAKS
end function
The COM+ component works fine and does retrieve a valid dataset. Replacing
"Set oRS = oClient.GetRecord(GsItem)" with "oClient.GetRecord(GsItem)" works
fine, too. So the problem really is with the assignment. Changing
"ADODB._Recordset" to "ADODB.Recordset" does not help either.
The exact error is:
------------------
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Object
required
I use Microsoft .NET Framework Version:1.1
Regards,
Rob
I have a COM+ component that returns an ADODB.Recordset. In an include file
that is included by an aspx page I assign that returned recorset to an
ADODB._Recordset. Unfortunately, this assignment breaks and after many days
I still couldn't figure out why. Therefore, any help is highly appreciated.
Note that the aspx pages were automatically converted by the MS/Artisan "ASP
to ASP.NET migration tool" which is only one small step in our full
migration path.
Here is a code snipet:
COM+ component (busData):
------------------------------
Public Function GetRecord(ByVal psItem As String) As ADODB.Recordset
Dim odbData As dbData.Data
Set odbData = GetObjectContext.CreateInstance("dbData.Data")
Set GetRecord = odbData.GetRecord(psItem) <-- VALID DATA IS RETURNED
(TESTED)
GetObjectContext.SetComplete
Set odbClient = Nothing
End Function
Include to aspx page:
---------------------
function aspGetData()
Dim oData As busData.Data
Dim oRS As ADODB._Recordset
Set oData = Server.CreateObject("busData.Data")
Set oRS = oClient.GetRecord(GsItem) <-- THIS BREAKS
end function
The COM+ component works fine and does retrieve a valid dataset. Replacing
"Set oRS = oClient.GetRecord(GsItem)" with "oClient.GetRecord(GsItem)" works
fine, too. So the problem really is with the assignment. Changing
"ADODB._Recordset" to "ADODB.Recordset" does not help either.
The exact error is:
------------------
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Object
required
I use Microsoft .NET Framework Version:1.1
Regards,
Rob