Home All Groups Group Topic Archive Search About

VB6 memory recordsets to .NET

Author
25 Oct 2006 5:59 AM
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.

Author
25 Oct 2006 7:14 AM
Miha Markic [MVP C#]
Hi Garry,

"Garry" <garrygrol***@gmail.com> wrote in message
news:ewjP1q$9GHA.4376@TK2MSFTNGP03.phx.gbl...
> 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...

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/
Author
25 Oct 2006 8:10 AM
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



Show quote
"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
news:ebGT%23UA%23GHA.924@TK2MSFTNGP03.phx.gbl...
> Hi Garry,
>
> "Garry" <garrygrol***@gmail.com> wrote in message
> news:ewjP1q$9GHA.4376@TK2MSFTNGP03.phx.gbl...
>> 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...
>
> --
> Miha Markic [MVP C#, INETA Country Leader for Slovenia]
> RightHand .NET consulting & development www.rthand.com
> Blog: http://cs.rthand.com/blogs/blog_with_righthand/
>
Author
25 Oct 2006 8:46 AM
Miha Markic [MVP C#]
I suggest you to go SDI instead as it is current trend...

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Show quote
"Garry" <garrygrol***@gmail.com> wrote in message
news:e6l8K0A%23GHA.4320@TK2MSFTNGP02.phx.gbl...
> 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
>
>
>
> "Miha Markic [MVP C#]" <miha at rthand com> wrote in message
> news:ebGT%23UA%23GHA.924@TK2MSFTNGP03.phx.gbl...
>> Hi Garry,
>>
>> "Garry" <garrygrol***@gmail.com> wrote in message
>> news:ewjP1q$9GHA.4376@TK2MSFTNGP03.phx.gbl...
>>> 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...
>>
>> --
>> Miha Markic [MVP C#, INETA Country Leader for Slovenia]
>> RightHand .NET consulting & development www.rthand.com
>> Blog: http://cs.rthand.com/blogs/blog_with_righthand/
>>
>
>
Author
25 Oct 2006 9:32 AM
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


Show quote
"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
news:%23zdeYIB%23GHA.4524@TK2MSFTNGP04.phx.gbl...
>I suggest you to go SDI instead as it is current trend...
>
> --
> Miha Markic [MVP C#, INETA Country Leader for Slovenia]
> RightHand .NET consulting & development www.rthand.com
> Blog: http://cs.rthand.com/blogs/blog_with_righthand/
>
Author
25 Oct 2006 10:53 AM
Miha Markic [MVP C#]
"Garry" <garrygrol***@gmail.com> wrote in message
news:u1LakhB%23GHA.4404@TK2MSFTNGP04.phx.gbl...
> 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 :-)

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/
Author
25 Oct 2006 5:10 PM
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


Show quote
"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
news:uELYGPC%23GHA.1128@TK2MSFTNGP05.phx.gbl...
>
> "Garry" <garrygrol***@gmail.com> wrote in message
> news:u1LakhB%23GHA.4404@TK2MSFTNGP04.phx.gbl...
>> 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 :-)
>
> --
> Miha Markic [MVP C#, INETA Country Leader for Slovenia]
> RightHand .NET consulting & development www.rthand.com
> Blog: http://cs.rthand.com/blogs/blog_with_righthand/
>
Author
27 Oct 2006 4:12 AM
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


Show quote
"Garry" <garrygrol***@gmail.com> schreef in bericht
news:ewjP1q$9GHA.4376@TK2MSFTNGP03.phx.gbl...
> 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.
>
Author
29 Oct 2006 8:32 PM
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.

Show quote
"Garry" <garrygrol***@gmail.com> wrote in message
news:ewjP1q$9GHA.4376@TK2MSFTNGP03.phx.gbl...
> 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.
>

AddThis Social Bookmark Button