Forum > Databases

IBX : Can it handle database operation when network connection is not stable?

<< < (5/9) > >>

incendio:
Thanks to all who gave me all info/hints regarding this topic.

I think we can agree that, there are no build in features in IBX to resume database operations (insert/update/delete) on an unstable network.

Build in -> no settings in properties/ events to create to automatically do this.

Developer must implement his/her own method to handle this situation.

I will try to test methods that is simple and easy to implement. Perhaps, I will open a new topic to discuss this.

MarkMLl:

--- Quote from: incendio on November 26, 2021, 05:53:15 am ---I think we can agree that, there are no build in features in IBX to resume database operations (insert/update/delete) on an unstable network.

--- End quote ---

Ditto in Lazarus/LCL/FPC itself :-/

The one thing I would suggest is that before you put too much effort into reinventing the wheel you investigate whether any other database backend has something in its client libraries which does this.

Apart from that a generalised discussion as to how to do it would probably be of interest to quite a lot of people.

MarkMLl

incendio:

--- Quote from: MarkMLl on November 26, 2021, 09:39:29 am ---
The one thing I would suggest is that before you put too much effort into reinventing the wheel you investigate whether any other database backend has something in its client libraries which does this.

--- End quote ---

I don't know about other databases, only playing with Firebird.

I think, it is not because of Firebird.

I tried JDBC with Firebird, unstable network is not a problem. With JDBC, when connection is broken, it will throw an error, but as soon as connection restored again, it can resume inser/edit /update data normally without a need to close and reopen connection again.

Also tried LCL from DevArt, only need to set three properties on the connection component to solve this problem.

MarkMLl:

--- Quote from: incendio on November 26, 2021, 09:56:06 am ---Also tried LCL from DevArt, only need to set three properties on the connection component to solve this problem.

--- End quote ---

More detail please.

However note that anything at the client end is (probably) only a partial fix: a broken connection will still almost certainly abort a transaction irrespective of server type.

MarkMLl

incendio:

--- Quote from: MarkMLl on November 26, 2021, 10:18:54 am ---
--- Quote from: incendio on November 26, 2021, 09:56:06 am ---Also tried LCL from DevArt, only need to set three properties on the connection component to solve this problem.

--- End quote ---

More detail please.

However note that anything at the client end is (probably) only a partial fix: a broken connection will still almost certainly abort a transaction irrespective of server type.

MarkMLl

--- End quote ---

With DevArt's LCL
1. Set 3 properties on connection component
2. Execute ApplyUpdate, if connection not available, it will wait for sometime before throw an error
3. If connection became available again before it throws error, ApplyUpdate automatically becomes successful.
4. If connection still unavailable, it will throw an error, but you can Execute ApplyUpdate again to try again.

There's a trial version of DevArt LCL, you can try it yourself.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version