View Single Post
  #2 (permalink)  
Old 08-07-2007, 06:16 AM
cachi cachi is offline
Member
 
Join Date: Jul 2007
Posts: 40
cachi is on a distinguished road
When you pull the data from the database, what do you do with that data?

For example, one approach would be to (1) get the data from the database, (2) create an array of elements that of type "Employee" or whatever the database table stores data for, (3) create new instances of type "Employee" and append them to the array you have created.

Once you have done that, then you don't need to make calls to the database..as you already have an array populated with data. then your focus should be placed on making the buttons (i.e. New, Previous...etc) pull data from the array instead of making SQL calls.

I am sure that there are other ways to do this, but I personally find this approach to be easier to program. Of course, you can use "Collections", which I personally prefer to arrays...as you can add elements to a given collection as and when needed.

Greetings.
Reply With Quote