473,399 Members | 3,656 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,399 software developers and data experts.

C#, .net and COM+ returning a recordset to classic ASP.

Does any know how to return a recordset object from COM+ component written
in C# so that it can be used as a Recordset in classic ASP?

I have the frame component written i'm just not sure what object/class i
should return. I tried returning SqlDataReader and ASP 3.0 found it to be
ADO type data but i'm not sure how to use this return type since it's not
actually an object (i tried using it as such)

Basically i need some way to use the same methods and properties of the
ADODB.Recordset object without writing a component to emulate the same
functionality.

any help will be much appreciated.

ps.

i'm new to COM so be gentle.
Nov 15 '05 #1
6 4970
Karl,

Why not add a reference to ADO in your C# project and use that?

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Karl Stankiewicz" <ok******@msn.com> wrote in message
news:u$**************@TK2MSFTNGP11.phx.gbl...
Does any know how to return a recordset object from COM+ component written
in C# so that it can be used as a Recordset in classic ASP?

I have the frame component written i'm just not sure what object/class i
should return. I tried returning SqlDataReader and ASP 3.0 found it to be
ADO type data but i'm not sure how to use this return type since it's not
actually an object (i tried using it as such)

Basically i need some way to use the same methods and properties of the
ADODB.Recordset object without writing a component to emulate the same
functionality.

any help will be much appreciated.

ps.

i'm new to COM so be gentle.

Nov 15 '05 #2
This is what i'm getting

[C# Error] Assembly generation failed -- Referenced assembly 'Interop.ADODB'
does not have a strong name
where do i go from here?
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:O$****************@TK2MSFTNGP11.phx.gbl...
Karl,

Why not add a reference to ADO in your C# project and use that?

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Karl Stankiewicz" <ok******@msn.com> wrote in message
news:u$**************@TK2MSFTNGP11.phx.gbl...
Does any know how to return a recordset object from COM+ component written in C# so that it can be used as a Recordset in classic ASP?

I have the frame component written i'm just not sure what object/class i
should return. I tried returning SqlDataReader and ASP 3.0 found it to be ADO type data but i'm not sure how to use this return type since it's not actually an object (i tried using it as such)

Basically i need some way to use the same methods and properties of the
ADODB.Recordset object without writing a component to emulate the same
functionality.

any help will be much appreciated.

ps.

i'm new to COM so be gentle.


Nov 15 '05 #3
Karl,

I assume you are trying to strong-name your assembly. You will have to
run the TLBIMP utility then, using the keyfile or the keycontainer switch to
indicate which key you want to use to create the strong-name for the interop
assembly. Once you have that, you can set a reference to it and it should
work.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Karl Stankiewicz" <ok******@msn.com> wrote in message
news:uQ**************@TK2MSFTNGP11.phx.gbl...
This is what i'm getting

[C# Error] Assembly generation failed -- Referenced assembly 'Interop.ADODB' does not have a strong name
where do i go from here?
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in message news:O$****************@TK2MSFTNGP11.phx.gbl...
Karl,

Why not add a reference to ADO in your C# project and use that?

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Karl Stankiewicz" <ok******@msn.com> wrote in message
news:u$**************@TK2MSFTNGP11.phx.gbl...
Does any know how to return a recordset object from COM+ component written in C# so that it can be used as a Recordset in classic ASP?

I have the frame component written i'm just not sure what object/class i should return. I tried returning SqlDataReader and ASP 3.0 found it to
be
ADO type data but i'm not sure how to use this return type since it's not actually an object (i tried using it as such)

Basically i need some way to use the same methods and properties of

the ADODB.Recordset object without writing a component to emulate the same
functionality.

any help will be much appreciated.

ps.

i'm new to COM so be gentle.



Nov 15 '05 #4
here is what i'm getting:
C:\>tlbimp.exe Interop.ADODB.dll /publickey:ServicedCOM2.snk
Microsoft (R) .NET Framework Type Library to Assembly Converter 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.

TlbImp error: The input file 'C:\Interop.ADODB.dll' is not a valid type
library
not sure if i'm doing this right. i also tried:
C:\>tlbimp.exe Interop.ADODB.dll /keyfile:ServicedCOM2.snk
can i build my COM object without the strong name?

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:ux****************@TK2MSFTNGP10.phx.gbl...
Karl,

I assume you are trying to strong-name your assembly. You will have to run the TLBIMP utility then, using the keyfile or the keycontainer switch to indicate which key you want to use to create the strong-name for the interop assembly. Once you have that, you can set a reference to it and it should
work.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Karl Stankiewicz" <ok******@msn.com> wrote in message
news:uQ**************@TK2MSFTNGP11.phx.gbl...
This is what i'm getting

[C# Error] Assembly generation failed -- Referenced assembly 'Interop.ADODB'
does not have a strong name
where do i go from here?
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote

in
message news:O$****************@TK2MSFTNGP11.phx.gbl...
Karl,

Why not add a reference to ADO in your C# project and use that?

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Karl Stankiewicz" <ok******@msn.com> wrote in message
news:u$**************@TK2MSFTNGP11.phx.gbl...
> Does any know how to return a recordset object from COM+ component

written
> in C# so that it can be used as a Recordset in classic ASP?
>
> I have the frame component written i'm just not sure what object/class i
> should return. I tried returning SqlDataReader and ASP 3.0 found it to
be
> ADO type data but i'm not sure how to use this return type since
it's not
> actually an object (i tried using it as such)
>
>
>
> Basically i need some way to use the same methods and properties of

the > ADODB.Recordset object without writing a component to emulate the

same > functionality.
>
>
>
> any help will be much appreciated.
>
>
>
> ps.
>
> i'm new to COM so be gentle.
>
>



Nov 15 '05 #5
Karl,

You have to run TLBIMP on the COM dll that you want to create an interop
wrapper for, not the interop wrapper yourself. In this case, it would be
the MSADO28.tlb (or something like that).
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Karl Stankiewicz" <ok******@msn.com> wrote in message
news:O8**************@TK2MSFTNGP12.phx.gbl...
here is what i'm getting:
C:\>tlbimp.exe Interop.ADODB.dll /publickey:ServicedCOM2.snk
Microsoft (R) .NET Framework Type Library to Assembly Converter 1.1.4322.573 Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.

TlbImp error: The input file 'C:\Interop.ADODB.dll' is not a valid type
library
not sure if i'm doing this right. i also tried:
C:\>tlbimp.exe Interop.ADODB.dll /keyfile:ServicedCOM2.snk
can i build my COM object without the strong name?

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in message news:ux****************@TK2MSFTNGP10.phx.gbl...
Karl,

I assume you are trying to strong-name your assembly. You will have to
run the TLBIMP utility then, using the keyfile or the keycontainer switch to
indicate which key you want to use to create the strong-name for the

interop
assembly. Once you have that, you can set a reference to it and it should work.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Karl Stankiewicz" <ok******@msn.com> wrote in message
news:uQ**************@TK2MSFTNGP11.phx.gbl...
This is what i'm getting

[C# Error] Assembly generation failed -- Referenced assembly

'Interop.ADODB'
does not have a strong name
where do i go from here?
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com>
wrote in
message news:O$****************@TK2MSFTNGP11.phx.gbl...
> Karl,
>
> Why not add a reference to ADO in your C# project and use that?
>
> Hope this helps.
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - mv*@spam.guard.caspershouse.com
>
> "Karl Stankiewicz" <ok******@msn.com> wrote in message
> news:u$**************@TK2MSFTNGP11.phx.gbl...
> > Does any know how to return a recordset object from COM+ component
written
> > in C# so that it can be used as a Recordset in classic ASP?
> >
> > I have the frame component written i'm just not sure what object/class
i
> > should return. I tried returning SqlDataReader and ASP 3.0 found

it to
be
> > ADO type data but i'm not sure how to use this return type since it's not
> > actually an object (i tried using it as such)
> >
> >
> >
> > Basically i need some way to use the same methods and properties
of the
> > ADODB.Recordset object without writing a component to emulate the

same > > functionality.
> >
> >
> >
> > any help will be much appreciated.
> >
> >
> >
> > ps.
> >
> > i'm new to COM so be gentle.
> >
> >
>
>



Nov 15 '05 #6
Sweet....
now if only i could get to make fresh coffe...
Very helpful.
Thanks a bunch!!!




"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:eq**************@TK2MSFTNGP10.phx.gbl...
Karl,

You have to run TLBIMP on the COM dll that you want to create an interop wrapper for, not the interop wrapper yourself. In this case, it would be
the MSADO28.tlb (or something like that).
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Karl Stankiewicz" <ok******@msn.com> wrote in message
news:O8**************@TK2MSFTNGP12.phx.gbl...
here is what i'm getting:
C:\>tlbimp.exe Interop.ADODB.dll /publickey:ServicedCOM2.snk
Microsoft (R) .NET Framework Type Library to Assembly Converter 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.

TlbImp error: The input file 'C:\Interop.ADODB.dll' is not a valid type
library
not sure if i'm doing this right. i also tried:
C:\>tlbimp.exe Interop.ADODB.dll /keyfile:ServicedCOM2.snk
can i build my COM object without the strong name?

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote

in
message news:ux****************@TK2MSFTNGP10.phx.gbl...
Karl,

I assume you are trying to strong-name your assembly. You will have
to
run the TLBIMP utility then, using the keyfile or the keycontainer switch
to
indicate which key you want to use to create the strong-name for the

interop
assembly. Once you have that, you can set a reference to it and it should work.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Karl Stankiewicz" <ok******@msn.com> wrote in message
news:uQ**************@TK2MSFTNGP11.phx.gbl...
> This is what i'm getting
>
> [C# Error] Assembly generation failed -- Referenced assembly
'Interop.ADODB'
> does not have a strong name
> where do i go from here?
>
>
> "Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
> message news:O$****************@TK2MSFTNGP11.phx.gbl...
> > Karl,
> >
> > Why not add a reference to ADO in your C# project and use
that? > >
> > Hope this helps.
> >
> > --
> > - Nicholas Paldino [.NET/C# MVP]
> > - mv*@spam.guard.caspershouse.com
> >
> > "Karl Stankiewicz" <ok******@msn.com> wrote in message
> > news:u$**************@TK2MSFTNGP11.phx.gbl...
> > > Does any know how to return a recordset object from COM+ component > written
> > > in C# so that it can be used as a Recordset in classic ASP?
> > >
> > > I have the frame component written i'm just not sure what

object/class
i
> > > should return. I tried returning SqlDataReader and ASP 3.0

found it to
> be
> > > ADO type data but i'm not sure how to use this return type since

it's
> not
> > > actually an object (i tried using it as such)
> > >
> > >
> > >
> > > Basically i need some way to use the same methods and properties of the
> > > ADODB.Recordset object without writing a component to emulate

the same
> > > functionality.
> > >
> > >
> > >
> > > any help will be much appreciated.
> > >
> > >
> > >
> > > ps.
> > >
> > > i'm new to COM so be gentle.
> > >
> > >
> >
> >
>
>



Nov 15 '05 #7

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

Similar topics

1
by: Robin Hammond | last post by:
Can anybody tell me why a) when running a stored proc from an asp page to return a recordset the command succeeds if the sp queries an existing table directly, but b) if the stored proc populates...
2
by: BenM | last post by:
I am a novice user of ASP.net, so the following might be trivial for many of you. I am trying to iterate through a datareader object and add rows to a table based on the recordset. Here is my...
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...
6
by: lenny | last post by:
Hi, I've been trying to use a Sub or Function in VBA to connect to a database, make a query and return the recordset that results from the query. The connection to the database and the query...
3
by: Ted Ngo | last post by:
I want to use the .net Web Service to create a function and return the datas (RecordSet). And want to retrived those data on the classic ASP. Does any body have some example of this. How to create...
3
by: James | last post by:
I need to create a C# web service that returns a recordset for an ASP classic applicaiton to consume. My problem is that so far the only thing that I have found I can return is a dataset using...
6
by: InnoCreate | last post by:
Hi everyone. I've recently written a classic asp website which uses an MS Access datasource. I know this is less than an ideal data source as it has limited functionality. I have a search form on...
0
by: =?Utf-8?B?UmFodnlu?= | last post by:
Hi All; I am writing a COM interface that will need to be called from VBScript (Legacy App). I need to return a recordset to the calling app. I am using ADODB to populate the recordset and...
1
by: murtyin | last post by:
Hi to All, I am creating COM Wrappers(CCW's) to the existing .Net Product, which is developed using C#. In this, am getting problem with setting "Item" propertty as the Default Property. My...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.