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

G

Guest

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

Nicholas Paldino [.NET/C# MVP]

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.
 

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