473,407 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Recordset - Object Required

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
Nov 18 '05 #1
6 2022
Have you tried to Initialize the RecordSet usin

oRS = New ADODB.Recordse

Regards

Trevor Benedict
MCSD
Nov 18 '05 #2
rob
Trevor,

Yes, I have already tried that. Again, with both ADODB._Recordset and
ADODB.Recordset.

Rob

"Trevor Benedict R" <tr********@yahoo.com> wrote in message
news:1C**********************************@microsof t.com...
Have you tried to Initialize the RecordSet using

oRS = New ADODB.Recordset

Regards,

Trevor Benedict R
MCSD

Nov 18 '05 #3
Another alernate thing that you could do to test this would be to create
a sample VB DLL to return a RecordSet and use the same reference in .NET
to test it out.

Sorry for not being of mych help. I tried to create a sample but it
works on my machine.

Regards,

Trevor Benedict R
MCSD

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #4
rob
Trevor,

Thanks a lot for your reply. I have created a VB project and tired to use it
in my aspx page but without success. You mentioned that you have written a
sample. In case you still have it could you send it to me. If it does not
work for me then there is probably a problem with my system. Otherwise I can
go from your example.

Thanks,
Rob

"Trevor Benedict R" <tr********@yahoo.com> wrote in message
news:uo**************@TK2MSFTNGP09.phx.gbl...
Another alernate thing that you could do to test this would be to create
a sample VB DLL to return a RecordSet and use the same reference in .NET
to test it out.

Sorry for not being of mych help. I tried to create a sample but it
works on my machine.

Regards,

Trevor Benedict R
MCSD

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #5
I would be pleased to help you with a sample. Do drop an email to me at
tr********@yahoo.com if you so require.

PS: I do not have a sample at present. I will just write a simple one
for you.

Regards,

Trevor Benedict R
MCSD

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #6
Hi,
Have you tested the sample that I sent. Any feedback on this issue. Have
you sorted it out.

Trevor Benedict R
MCSD

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Thomas Scheiderich | last post by:
Why would you use the Recordset object over the Execute method of getting data from your Sql database. For example, I have the following: Execute Method...
4
by: Tom | last post by:
I want to open a recordset object on an .asp page. When I open the recordset I would like to use a stored procedure that expects a parameter to be passed for the stored procedure. I will then use...
7
by: David Berry | last post by:
I'm trying to use a recordset inside of a function but I'm getting an "object required 'adoRS" error. At the top of the page I create my recordset, ex: dim strConnection, adoCN, adoRS, strSQL...
8
by: dmiller23462 | last post by:
My brain is nuked....Can anybody tell me right off the bat what is wrong with this code? Along with any glaring errors, please let me know the syntax to display a message (Response.Write would be...
19
by: Adam Short | last post by:
I am trying to write a routine that will connect a .NET server with a classic ASP server. I know the following code doesn't work! The data is being returned as a dataset, however ASP does not...
27
by: Oscar | last post by:
I am looking for a way to pass an ADO recordset that has been retrieved in an ASP page to another HTML-page. Is there someone who can provide me with a small sample or a link to see how this is...
18
by: Darryl Kerkeslager | last post by:
When I open an ADO Recordset, I close it. However, it seems that there may be some difference in this manner of opening a Recordset: Dim rL As ADODB.Recordset Set rL = New ADODB.Recordset ...
36
by: kjvt | last post by:
Based on a prior posting, I've written a function to convert a recordset to a dataview. The first call to the function for a given recordset works perfectly, but the second call always returns a...
14
by: Karl Irvin | last post by:
While adding data to a record set, I use something like rst! = some variable rst! = some variable ...... rst! = some variable The rst! , rst! etc. are manually typed in and it gets...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.