473,386 Members | 1,798 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,386 software developers and data experts.

how to pass a recordset from VC6 to C# COM object

I'm designing a C# object that must be usable from VC6 and VB6, as well as
..NET. How do I create the following method in C# so that VC6 and VB6 can
pass in readonly recordsets?

InputFARS(_RecordsetPtr *FARS);

And then how do I traverse the recordset once in C#?

[I'm very new to C#.]

--
Doug Taylor
Nov 16 '05 #1
1 2555
Doug,

You are going to have to set a reference in your project to "Microsoft
Active X Data Object Library". Once you do that, just declare your function
like this:

public void InputFARS(ADODB.Recordset FARS)
{
}

Then, when exposing this through COM interop, it should work.

Hope this helps.

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

"Doug Taylor" <dv******@nospam.nospam> wrote in message
news:E4**********************************@microsof t.com...
I'm designing a C# object that must be usable from VC6 and VB6, as well as
.NET. How do I create the following method in C# so that VC6 and VB6 can
pass in readonly recordsets?

InputFARS(_RecordsetPtr *FARS);

And then how do I traverse the recordset once in C#?

[I'm very new to C#.]

--
Doug Taylor

Nov 16 '05 #2

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

Similar topics

2
by: Joe | last post by:
I have a function called GetRS which takes in a SQL string and returns a recordset object. Does this mean that a copy of the recordset is returned or is it passed by reference? Obviously this...
1
by: Rufus DeDufus | last post by:
This is more a matter of programming taste ... I have a Database DLL that is calling into Access through OLEDB, and exposes functions like AddPerson(STRING szFirstName, STRING szLastName, INT uAge)...
3
by: JingleBEV | last post by:
Hi all, I am trying not to use global variable to maintain data consistency. Some procedures and functions will require to pass the recordset object for processing and functions may also return...
3
by: Lyn | last post by:
Hi, I have been experiencing a problem passing a LIKE statement in the WHERE argument of a DoCmd.Openform statement. I have posted that issue separately. However, in an attempt to work around...
7
by: Zlatko Matić | last post by:
Let's assume that we have a database on some SQL server (let it be MS SQL Server) and that we want to execute some parameterized query as a pass.through query. How can we pass parameters to the...
3
by: Andrew Mueller | last post by:
Hello, I tried this question prior and got no response, so thought I would try to explain differently.. I am not sure which type of object to pass between a VB 6.0 ActiveX dll and C#. I am...
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...
5
by: slowmotiongenius | last post by:
All- I have established an adodb recordset in my code-behind, and I need to pass it to the aspx file. I can't seem to figure out if there is a way to do this. I see you can pass a string over...
1
by: tjjones70 | last post by:
I am trying to load list boxes from an Access database. I'm looking at 3 tables and for each table I'm loading a list box that has current information and another list box that has expired...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.