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

  • Thread starter Thread starter Guest
  • Start date Start date
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#.]
 
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.
 
Back
Top