Questions

  • Thread starter Thread starter pcPirate
  • Start date Start date
P

pcPirate

Hi,

i) I've compiled a set of VB6 code into dll and add it (as a reference) into
my C# program. When I clicked "Run", the program windows run pretty well.
When I clicked the "Close" button of the windows, the program didn't stop
fully, which made me have to click the "Stop" from the compiler. Can anyone
help?

ii) Is there anyway to sort a dataTable by ascending or descending?

Please advice and thanks in advance.
pcPirate
 
pcPirate,

Without knowing what your code in VB is doing (or your .NET code), it is
a little difficult. I would think that maybe there is a circular reference
somewhere which isn't being cleaned up.

To sort a datatable, you should create a new DataView class instance,
attaching it to the DataTable. Once you do this, you can set the Sort
property on the DataView, and access the rows through the DataView in the
order as they would appear in the sort.

Hope this helps.
 
pcPirate said:
Ok, my VB6 code contains a routine to access a tailored database via RDO.
I've compiled the VB6 code into *.dll and set it as a reference in my C#.
When I run my C# code, I would first have to access the tailored database
(in which, access the VB6's dll). And then, when I close the run program
from the C# compiler (MS VS.net), it doesn't stop fully.

Pls advice and thanks in advance.
pcPirate

message news:[email protected]...
pcPirate,

Without knowing what your code in VB is doing (or your .NET code),
it
is
a little difficult. I would think that maybe there is a circular reference
somewhere which isn't being cleaned up.

To sort a datatable, you should create a new DataView class instance,
attaching it to the DataTable. Once you do this, you can set the Sort
property on the DataView, and access the rows through the DataView in the
order as they would appear in the sort.

Hope this helps.


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

pcPirate said:
Hi,

i) I've compiled a set of VB6 code into dll and add it (as a
reference)
into
my C# program. When I clicked "Run", the program windows run pretty well.
When I clicked the "Close" button of the windows, the program didn't stop
fully, which made me have to click the "Stop" from the compiler. Can anyone
help?

ii) Is there anyway to sort a dataTable by ascending or descending?

Please advice and thanks in advance.
pcPirate
 
Back
Top