473,396 Members | 2,102 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,396 software developers and data experts.

vb 6 Variant to C# object.

Hi,
I’m trying to use net remoteing with Com+. I created a wrapper for the com object. I can call the com object from my c# client and an able to get return type of strings and int’s. One of the methods returns a variant. I can get the object back from the com object but cannot convert it. I tried using adodb. examples I tried is.

object dept = obj.tryme();--- this wraps the com call which returns a variant.
ADODB._Recordset rs = (ADODB._Recordset) dept; and

OleDbDataAdapter da = new OleDbDataAdapter();
da.Fill(DS,dept, "test");

dept is the variant that is return from the com object. which is a recordset.
The current asp page uses it like this.
rsDept = objdept.getdepartment(1,"")
using the da.fill I get an exeception of
Unable to retrieve the IRowset interface from the ADODB.Recordset object.

The type of object retruned is system._comobject.

Any suggestions?

Thanks
Russ

Jul 21 '05 #1
0 1543

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

Similar topics

1
by: C. N. Sridhar | last post by:
Hi, I'm writing a wrapper to a win32 dll in C#. I need to call a method in DLL which has a Variant type reference parameter. How to marshal variant type from win32 (unmanaged code) to C#...
0
by: Russ | last post by:
Hi, I’m trying to use net remoteing with Com+. I created a wrapper for the com object. I can call the com object from my c# client and an able to get return type of strings and int’s. One of...
19
by: Jon Davis | last post by:
Hi guys! Just wanted to let you all know that I created a Variant structure, inspired by the old VB6 days. This is written in C#, but you can build a CLR/.NET class library assembly and reference...
0
by: Russ Gadagno | last post by:
Hi, I’m trying to use net remoteing with Com+. I created a wrapper for the com object. I can call the com object from my c# client and an able to get return type of strings and int’s. One of...
0
by: dwinson | last post by:
I am writing an add-in in C# for a server written in VB6. In order for my add-in to work I need to implement this method: MyMethod(string inputData) .... so my C# code looks like this: ...
2
by: Heike | last post by:
Hello everybody, I have a Problem with C Sharp. I have to use external functions in DLLs. This Functions are written in Visual C++ 6 like this: int (__stdcall *GetGlobalValue) (VARIANT Appl,...
7
by: Tracks | last post by:
I have old legacy code from vb5 where data was written to a file with a variant declaration (this was actually a coding error?)... in vb5 the code was: Dim thisdata as integer Dim thatdata...
0
by: MikalE | last post by:
I’m using a third-party ActicveX component that has the following description for one of its events: They mean by this that LocationType is an array of VARIANTS (containing enumeration) When...
4
by: =?Utf-8?B?cmtibmFpcg==?= | last post by:
How can I define type variant in c#?
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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...

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.