what is the Faster?? ArryList Or Conncetion to database

dark night

New member
Joined
Aug 21, 2006
Messages
3
Programming Experience
Beginner
hi all,


i have problem in my projetc it is :

i have table in database it contains 12 rows only, it doesn't be more than 12 rows,

i have 3 WebForms every from has 6 records

every record has 2 textbox one of them is type that the user enter it


when the user fill al 6 records of any webform then press Save

Have 2 ways:

1- it goes in for loop to get price from SQLServer DataBase for each type and save it

2- i do some thing else when the user login i read all 12 rows and put it in ArryList and transfar it by Session so when user press save, do some loops to get price for each record and do one connection for insert in DB



my Quetion:
want is the fast ?!! Looping arrylist Or Quiry and connect to the SqlServer DB




thanks alote

i hope to help and give me good information and knowlage


best regards,
 
The short answer to this is that any round trip to any database is 'expensive' it is always preferrable to do things locally if possible and commit all changes in one go.
 
Ok

i wanna thanks all bady their ansered me my Q.

i have another small Q. where is the arrylist stored ?? in Server machine Of in clint machine ??



thanks very much
 
Back
Top