hey, folks,
I have another design question would like you guys to give me some advices.
When you query the database and return a dataset/record set, do you still populate the return set into objects then use the objects within your application not the return dataset?
When I develop application, I need to query the database to retrieve data to populate objects. Let say if I have to query a Sale table to get the monthly sale record, I get a dataset/record set from database, then I loop througt each row and create a sale object with the according value. Then I insert each object into an arraylist. After that, I use the arrylist through my application.
Do you guys think this is the good pratice? Somehow, I feel this is a cumbersome process.
Thanks for any comment.
I have another design question would like you guys to give me some advices.
When you query the database and return a dataset/record set, do you still populate the return set into objects then use the objects within your application not the return dataset?
When I develop application, I need to query the database to retrieve data to populate objects. Let say if I have to query a Sale table to get the monthly sale record, I get a dataset/record set from database, then I loop througt each row and create a sale object with the according value. Then I insert each object into an arraylist. After that, I use the arrylist through my application.
Do you guys think this is the good pratice? Somehow, I feel this is a cumbersome process.
Thanks for any comment.