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

K

Karl Stankiewicz

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.
 
N

Nicholas Paldino [.NET/C# MVP]

Karl,

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

Hope this helps.
 
K

Karl Stankiewicz

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 said:
Karl,

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

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Karl Stankiewicz said:
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.
 
N

Nicholas Paldino [.NET/C# MVP]

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]
- (e-mail address removed)

Karl Stankiewicz said:
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?


message news:O$%[email protected]...
Karl,

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

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Karl Stankiewicz said:
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
 
K

Karl Stankiewicz

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 said:
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]
- (e-mail address removed)

Karl Stankiewicz said:
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?


message news:O$%[email protected]...
Karl,

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

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

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 to it's
not
 
N

Nicholas Paldino [.NET/C# MVP]

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]
- (e-mail address removed)

Karl Stankiewicz said:
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?



message news:uxHn2%[email protected]...
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]
- (e-mail address removed)

Karl Stankiewicz said:
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]" <[email protected]>
wrote
in
message Karl,

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

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

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.
 
K

Karl Stankiewicz

Sweet....


now if only i could get to make fresh coffe...


Very helpful.
Thanks a bunch!!!










Nicholas Paldino said:
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]
- (e-mail address removed)

Karl Stankiewicz said:
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?



message news:uxHn2%[email protected]...
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]
- (e-mail address removed)

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?


in
message Karl,

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

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

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 the
same
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top