cadwalli
Active member
Hi
Im trying to understand whether i have my "concept" of what im doing right here.
Basically, ive got some data in a DB tables called "Categories". This is just like a table of codes and descriptions etc.
Now in my code I have an Object/Class also called category which has the proerties matching the table plus some manipulation events to allow me to use the properties.
What im wondering is - whats the best method to load data into that object.
Do I use a dataset to load the data, then all those records retrieve load into obejcts so i basically have "x" number of objects in a collection.
i.e.
collectionObj1 - category1, collectionobj2 - category2
then manipulate each object as required and write it back to the dataset then to the db
OR
or is it best just to load into the dataset, then a selected record (i.e. pressing Edit button) in that dataset load into a single object of type category and manipulate, write back to the set and then back to the database - then if the user wants to change another record load that into the obejct and do the same.
Hope this makes sense.
Thanks in advance.
Im trying to understand whether i have my "concept" of what im doing right here.
Basically, ive got some data in a DB tables called "Categories". This is just like a table of codes and descriptions etc.
Now in my code I have an Object/Class also called category which has the proerties matching the table plus some manipulation events to allow me to use the properties.
What im wondering is - whats the best method to load data into that object.
Do I use a dataset to load the data, then all those records retrieve load into obejcts so i basically have "x" number of objects in a collection.
i.e.
collectionObj1 - category1, collectionobj2 - category2
then manipulate each object as required and write it back to the dataset then to the db
OR
or is it best just to load into the dataset, then a selected record (i.e. pressing Edit button) in that dataset load into a single object of type category and manipulate, write back to the set and then back to the database - then if the user wants to change another record load that into the obejct and do the same.
Hope this makes sense.
Thanks in advance.