![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 11 to 20 of 21 total |
![]() |
Wed, Sep 23 2015 6:28 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Pasquale,
<< how do I catch and handle this error ? This error I create it by doing two tasks simultaneously. I think the problem is this : when a user makes an update while the other still not done then the second is the inconsistent database and then goes wrong commit >> Can you distill this down into an example project that you can send me, along with your SQL Server database ? I'll need to recreate this here to see what the issue is. Just to confirm, you're using the EWB Web Server, correct ? Tim Young Elevate Software www.elevatesoft.com |
Thu, Sep 24 2015 10:41 AM | Permanent Link |
Pasquale Web Pos srl | THIS IS CODE
procedure TFormGestionePlafond.myCommitError(Sender: TObject; const ErrorMsg: String); Begin Database.AfterCommit := nil; Database.OnCommitError := nil; PosPlafond.Cancel; EsitoTransazione := 'Errore Plafond'; Close; End; procedure TFormGestionePlafond.DetrazionePlafondClick(Sender: TObject); begin database.OnCommitError := myCommitError; PosPlafond.Params.Clear; PosPlafond.Params.Add('IDMerchant='+IDMerchant); DataBase.LoadRows(PosPlafond); end; procedure TFormGestionePlafond.PosPlafondAfterLoad(Sender: TObject); begin IF PosPlafond.columns['Plafond'].AsFloat - PrezzoMerchant >=0 Then Begin IF Not DataBase.InTransaction Then Begin DataBase.StartTransaction; Try PosPlafond.Update; PosPlafond.columns['Plafond'].AsFloat := PosPlafond.columns['Plafond'].AsFloat - PrezzoMerchant; PosPlafond.Save; Database.Commit; EsitoTransazione := 'Plafond Detratto'; PosPlafond.Close; Close; Except Database.Rollback; raise Exception.Create('Errore Prelievo Plafond'); End; End Else Begin MessageDlg('Altra transazione in corso!','Informazione',mtError,[mbOk],mbOk,nil,True); End; End Else Begin EsitoTransazione := 'Plafond Insufficiente'; MessageDlg('Plafond insufficiente!','Informazione',mtError,[mbOk],mbOk,nil,True); PosPlafond.Close; Close; End; end; THIS IS THE STRUCTURE TABLE MSSQL IDMerchant int Unchecked Stato varchar(10) Unchecked Plafond money Unchecked Utente varchar(20) Unchecked |
Thu, Sep 24 2015 11:17 AM | Permanent Link |
Pasquale Web Pos srl | Yes using the EWB Web Server
I think the problem is in the management of the commit , in the sense that when the database is inconsistent for one of the two operations made ​​almost simultaneously then you should intercept error and handle it. but I can not do this because I make a mistake or because there is a problem. |
Thu, Sep 24 2015 12:28 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Pasquale,
<< I think the problem is in the management of the commit , in the sense that when the database is inconsistent for one of the two operations made ​​almost simultaneously then you should intercept error and handle it. but I can not do this because I make a mistake or because there is a problem. >> No, this isn't correct. The error that you posted indicates that a server request failed to connect to the EWB Web Server at all, which will only occur if the web server is unavailable for some reason, or if a server request failed completely due to some issue with the request (in the browser). Also, I need your actual database and an actual project that shows the problem that you're having. Not just snippets of code and a table structure. If I had to recreate every customer's project that was experiencing a problem, I would never get anything done. Tim Young Elevate Software www.elevatesoft.com |
Mon, Sep 28 2015 5:06 AM | Permanent Link |
Pasquale Web Pos srl | Attach project and the mbspay.bak is bakup of database mssql express 2014
Tim Young [Elevate Software] wrote: Pasquale, << I think the problem is in the management of the commit , in the sense that when the database is inconsistent for one of the two operations made ​​almost simultaneously then you should intercept error and handle it. but I can not do this because I make a mistake or because there is a problem. >> No, this isn't correct. The error that you posted indicates that a server request failed to connect to the EWB Web Server at all, which will only occur if the web server is unavailable for some reason, or if a server request failed completely due to some issue with the request (in the browser). Also, I need your actual database and an actual project that shows the problem that you're having. Not just snippets of code and a table structure. If I had to recreate every customer's project that was experiencing a problem, I would never get anything done. Tim Young Elevate Software www.elevatesoft.com Attachments: mbspay.zip |
Thu, Oct 1 2015 11:26 AM | Permanent Link |
Pasquale Web Pos srl | there is news ?
I did some tests with the SQL SERVER PROFILE . and actually when he tries to make the commit table PLAFOND that was changed a second before a general ROLLBACK but not intercepted by commit error . Tim Young [Elevate Software] wrote: Pasquale, << I think the problem is in the management of the commit , in the sense that when the database is inconsistent for one of the two operations made ​​almost simultaneously then you should intercept error and handle it. but I can not do this because I make a mistake or because there is a problem. >> No, this isn't correct. The error that you posted indicates that a server request failed to connect to the EWB Web Server at all, which will only occur if the web server is unavailable for some reason, or if a server request failed completely due to some issue with the request (in the browser). Also, I need your actual database and an actual project that shows the problem that you're having. Not just snippets of code and a table structure. If I had to recreate every customer's project that was experiencing a problem, I would never get anything done. Tim Young Elevate Software www.elevatesoft.com |
Thu, Oct 1 2015 11:37 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Pasquale,
<< there is news ? >> Not yet. Needed to update both my VS and my SQL Server installations, and we're right in the middle of releasing new minor releases for all of our products. So, it will take a day or so more until I have an answer for you. Tim Young Elevate Software www.elevatesoft.com |
Thu, Oct 1 2015 5:29 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Pasquale
Okay, I'm looking at your project now. However, I'm still missing something: I need your the ewbide.ini file from your installation here: C:\Users\<User Name>\AppData\Local\Elevate Software\Elevate Web Builder 2 It has your dataset definitions in it, including how the datasets are defined (query datasets, especially). I'll need those in order to run your application and see what the issue is. Tim Young Elevate Software www.elevatesoft.com |
Sat, Oct 3 2015 2:18 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Pasquale,
In case you didn't see my last reply: I need all of your dataset definitions because you sent me your entire project instead of an cut-down example project. Tim Young Elevate Software www.elevatesoft.com |
Mon, Oct 5 2015 7:02 AM | Permanent Link |
Pasquale Web Pos srl | attach file request.
Tim Young [Elevate Software] wrote: Pasquale, In case you didn't see my last reply: I need all of your dataset definitions because you sent me your entire project instead of an cut-down example project. Tim Young Elevate Software www.elevatesoft.com Attachments: ewbide.ini |
« Previous Page | Page 2 of 3 | Next Page » |
Jump to Page: 1 2 3 |
This web page was last updated on Monday, May 29, 2023 at 11:23 AM | Privacy Policy![]() © 2023 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |