jemmyhatta Posted December 19, 2014 Share Posted December 19, 2014 Hello, First of all, please pardon my English, I'm Indonesian. I have e-commerce project for request maintenance's order. I'm using components stored procedure FireDAC in unidatamodule, unidbgrid, etc. Now I'm in the testing stage to try whether this project is ready to deploy or not, and running some tests on it. The first test is to do some "concurrent data submit". In same time, multiple testers are inputting and trying to submit the datas. Then, I've got the "Key Violation" error message. Is there any way to lock the session or for buying me some time when I run the 'execproc' to avoid that error? Or, any other way to solve that? Thanks. The second test is to input as many datas as possible in slightly different submit time (not exactly the same, maybe just differ for several seconds). When the datas are successfully saved, each user see differences in unidbgrid. There're different data records for each of them, even when they already run the "Refresh" button (which is already there in unidbgrid); even when I already close and reopen the execproc table. DataModule.spEditHOrder.Prepare; DataModule.spEditHOrder.ExecProc; DataModule.spQueryHOrderBlmProses.Active:=False; DataModule.spQueryHOrderBlmProses.Active:=True; Example: Before testing begins, there're 10 records of datas. User1, User2, and User3 are trying to add 3 datas for each of them. The result is that User1 got to see 13 datas, User2 sees 16 datas, and User3 15 datas. In database, the total summary is 19 datas (correct, 10 + 3*3). But, is it normal? For each user just seeing differences in total data records appeareances? After executing the line "DataModule.spEditHOrder.ExecProc;" Then, what to do next, "DataModule.spEditHOrder.Release;" or "DataModule.spEditHOrder.Refresh;" ? Thank you in advance. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.