VB6 memory recordsets to .NET

G

Garry

WE are doing the big leap.

We have a very large VB6 app, Standalone, Access orientated and we want to
start Re-Writing it in .NET

We make extensive use of code defined and generated memory recordsets which
allow us multiple sort keys with various data types, (Dates etc). And it has
additional methods like Find etc

I have seen no light construct/object in .NET as the DataSet has a lot of
unnecessary baggage. It retains changes.

The app has a complex calculation module which stores the results in a large
memory recordset (300 - 1200 records, 30 to 200 fields) and the constant
accruations and manipulations presumably make a DataSet unsatisfactory

Does anyone have a constructive suggestion???

Reminder - Collections cannot have multiple sort keys.
 
M

Miha Markic [MVP C#]

Hi Garry,

Garry said:
WE are doing the big leap.

We have a very large VB6 app, Standalone, Access orientated and we want to
start Re-Writing it in .NET
Good.


We make extensive use of code defined and generated memory recordsets
which allow us multiple sort keys with various data types, (Dates etc).
And it has additional methods like Find etc

I have seen no light construct/object in .NET as the DataSet has a lot of
unnecessary baggage. It retains changes.

Ehm? It has to intialize itself.
The app has a complex calculation module which stores the results in a
large memory recordset (300 - 1200 records, 30 to 200 fields) and the
constant accruations and manipulations presumably make a DataSet
unsatisfactory

I really don't see why it is unsatisfactory. And it doesn't look to me like
a large amount of data.
Did you actually do performance testing?
Does anyone have a constructive suggestion???

Use a DataTable as you don't need entire dataset (or do you?). It should be
easy to implement, flexible and fast enough.
Reminder - Collections cannot have multiple sort keys.

Thanks for the reminder. You should take a look at List<> (it has powerful
Sort method) and SortedList<>.
And if it still too slow for you then you can even create indexes by
yourself if you wish to...
 
G

Garry

Thank you. I will look up info available on List

We have not done any performance testing as we are just making preparations.

Do you know where there is demo code available for an MDI application as the
code that I have is not too helpfull. Especially resizing the mdi child to
completely fill the Client area of the MDI form

Garry
 
G

Garry

Miha Hi,

I don't see any specific material about defining an app as SDI and someone,
a post, suggests coding an object that would control any form generated in
the application giving the appearance of an SDI app.

BUT

I do not see that VB.NET supports this directly.

Do you???? Am I missing something?????

We do not want to re-invent the wheel. OR even invent the wheel. Especially
as we are trying to plan the rewriting of a large VB6 app to VB.NET. I
stress the rewriting and not converting

Garry
 
M

Miha Markic [MVP C#]

Garry said:
Miha Hi,

I don't see any specific material about defining an app as SDI and
someone, a post, suggests coding an object that would control any form
generated in the application giving the appearance of an SDI app.

BUT

I do not see that VB.NET supports this directly.

Sure it does.
Do you???? Am I missing something?????

Create UserControls instead of forms and show them on the main form when
necessary. This is SDI.
Note that soon-to-be-released Windows Presentation Foundation aka Avalon is
SDI only (that's the direction).
We do not want to re-invent the wheel. OR even invent the wheel.
Especially as we are trying to plan the rewriting of a large VB6 app to
VB.NET. I stress the rewriting and not converting

Sure :)
 
G

Garry

Dear Miha,

Sadly I am not very trendy and Microsoft may indicate trends BUT they are
not always taken up. While getting ready to take the plunge to DOT NET, I am
certainly not going to 'break new ground' and will stick with MDI even if I
suspect that Microsoft forgot about MDIs in the initial stages of .NET
development and preferred to emphasize the 'Garbage Collector" and Internet
possibilities instead.

The List object may have its 'type' safety but seems to me to be one
dimensional and not 2 dimensional. Am I mistaken?? Perhaps you have a link
to a code sample where I can determine what is possible with Lists and
ArrayLists.

Does a DataTable 'track changes' or can I understand it as I would a memory
recordset. Or alternatively, can the 'tracking' be turned off.

As I explained the calculation, that would be an average recordset size but
the columns could double and the rows increase tenfold. Depends on the users
definitions.

Garry
 
C

Cor Ligthert [MVP]

Garry,

You will surely be happy with a datatable as Miha suggest, it will take
probably much less work and resources than your now inbuild recordset.

If I can do it with a datatable, I will never do it with any self build
list. The datatable has so many methods build in, which I would have to
build myself with a list, that I will only take that time if it real will
help me.

Cor
 
E

Earl

Garry,

While it certainly sounds like a datatable is the answer, I recommend a few
ADO.Net 2.0 books before you begin. You will likely discover some better
techniques than a disjointed discussion on here can provide. David Sceppa,
Bill Vaughn, and Sahil Malik all have good books on the topic.
 

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