hi i have a two tables namely tblRates and tblRatesdetail.i have a simple web application and basically it will be contacted by 20 person at the same time(Multi user environment)
basically tblrates includes ratecode(autogen number) and after adding records to tblrates then tblRatesdetail record data will be added to the db.that tblrate table rateCode will be act as the forign key in the tblRatedetails table.
E:x in tblRates
rateCode ratename maxweight add price
100 , testrate , 2.00 , 0.50
in tblratedetails
rateCode(fk) weight price
100 , 0.5 , 10
100 , 1.0 , 12
100 , 1.5 , 14
100 , 2.0 , 16
ratecode i got from the SQL Max function after header record inserted to system.
Then i have a doubt then when multi user environment that multiple users are entering data to the system,is there any way to maximize accuracy of the data being stored in the system, what is the best practice to avoid any mistakes. bacause i have doubt Since data goes for 2 tables and usage of Max Function. when one user insert record to tblrates and while its getting MAx rateCode from tblRates is there any possibility for other user record to insertion for tblrates?if that happens how to avoid that problem? Thanks in Advance if you could assist in this matter!!!how to manage multiusers effectively?