I have a table called driver and i want to update the drivers’ position fields (‘pos_x’ and pos_y) with random numbers and what i did was once select the data from table (to see how many drivers do i have) then update their position then select the data again is there another way to do this thing?
Share
If you create a class to hold the driver information, then you can eliminate the last step (selecting the data again).
The steps would be:
1) Read the data into a List.
2) Update the values in the List.
3) Write the data from the List to the database.