Creating class based on table

xpertwinner

Member
Joined
Dec 26, 2008
Messages
24
Programming Experience
Beginner
I am making a program where I have a table of information, and I need to make a list of objects according to that table, so that I can work with them, for instance change their position, make some calculations based on their properties, etc.

Is there any way I can create a class that is based on a data table, and make visual basic automatically create objects of that class according to the table info?
 
Yes I know it at design time. I have done it manually, as in

objectblabla.components.add(AuxiliaryComp)
Objectblabla.components.AuxiliaryComp.Nome= blabladataset.components.row(i).Nome
etc.


but if there was an automatic method it would be simpler and avoid errors.
 
Add a Data Source to your project, which will generate a typed DataSet. The DataSet will contain a DataTable for each table in the database and each DataRow will have a property for each column.
 

Latest posts

Back
Top