Is an array of Objects in vb.net a good equivalent for an array of Variants in v

  • Thread starter Thread starter WayneM
  • Start date Start date
W

WayneM

I have a vb6 app that uses an array of variants, like a
database table that I would like to convert to vb.net.
Does it make sense to use an array of objects in vb.net?

Any other suggestions?

Thanks,

WayneM
 
WayneM said:
I have a vb6 app that uses an array of variants, like a
database table that I would like to convert to vb.net.
Does it make sense to use an array of objects in vb.net?

Any other suggestions?

Thanks,

WayneM

To Answer your Question, yes. To go further, I can think of about 50
ways of converting an array of varients, but I don't know specifics, so yes
to your question.
To expand on what Cor said, ADO.NET is so changed and new, well, it's
worth checking out.

HTH
Suefell
 
* "WayneM said:
I have a vb6 app that uses an array of variants, like a
database table that I would like to convert to vb.net.
Does it make sense to use an array of objects in vb.net?

The framework contains classes to hold database tables.
 
Wayne,
To continue the ADO.NET theme. David Sceppa's book "Microsoft ADO.NET - Core
Reference" from MS Press contains a wealth of information on ADO.NET it is a
good book to learn how to use ADO.NET while also being a good desk reference
once you are applying ADO.NET.

You should find that using the System.Data.DataTable object to represent
your database table, along with its System.Data.DataRow object to represent
individual rows (your array of variants) is more flexible than an unordained
array of objects. Especially when you start utilizing the DataSet,
DataColumn, Constraint, DataRelation, and DataView classes along with it.

Note that a DataTable is independent of the underlying database. A DataSet
(the container for DataTables) can be read & written to an XML file for
example.

Hope this helps
Jay
 
Back
Top