Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

error after row deletion

Having trouble with some users experiencing regular exposure to the error message that points its finger at SRP Controls but provides absolutely no other info.
Have narrowed it down to the process of invoking the deleterecords method. After calling this method each and every subsequent event produces the messagebox and so the table is no longer useable. However it's not just the use of deleterecords in general but when it is used in a specific circumstance.

It occurs only when the cell that has focus is the first cell in the last row of the table. If it's another row or just a different cell in the last row, then no problem. It may also be related to the fact that the cell is a combo but I don't have any edittables where the first column isn't a combo so that may just be coincidence.

The process goes like this


Comments

  • Whilst debugging I sometimes caught this occurring between when the 'deleterecords' was called and when the row actually disappeared but the end result was the same.

  • Is your OnClick asynchronous or synchronous? If it's the latter, then the problem is due to the fact that the SRP EditTable has been "paused" during your handling of the event, but when it is finally allowed to continue, the cell that was currently in use is suddenly not there. Only Before events should be synchronous.

    If OnClick is asynchronous, then something else is going on and I'll have to investigate.
  • How is OnClick made asynchronous?
  • How is OnClick made asynchronous?
    By default all OLE events are asynchronous, but the QUALIFY_EVENT message can be configured to make an event synchronous. Check the synchronous flag docs for the OLE event.
  • edited September 2017
    My only synchronous ones are these ones
    Qualify_OLE_Event(CtrlEntId, BeforeDeleteRecords$, 2) Qualify_OLE_Event(CtrlEntId, BeforeEdit$, 2) Qualify_OLE_Event(CtrlEntId, BeforeInsertRecords$, 2) Qualify_OLE_Event(CtrlEntId, BeforeNewRecords$, 2) Qualify_OLE_Event(CtrlEntId, BeforeUpdate$, 2) Qualify_OLE_Event(CtrlEntId, PosChanging$, 2)
Sign In or Register to comment.