Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #7734 > unrolled thread
| Started by | Robert Pope <cooeee@gmail.com> |
|---|---|
| First post | 2015-02-10 05:39 -0800 |
| Last post | 2015-02-13 02:14 -0800 |
| Articles | 5 — 4 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
DBServer - saving changes without Commit during app crash Robert Pope <cooeee@gmail.com> - 2015-02-10 05:39 -0800
Re: DBServer - saving changes without Commit during app crash "Jamal Assaf" <someone@example.com> - 2015-02-10 17:47 -0500
Re: DBServer - saving changes without Commit during app crash Martin <spam@spam.spam> - 2015-02-11 15:55 +0000
Re: DBServer - saving changes without Commit during app crash "Dirk (Belgium)" <dirk.dot.herijgers@pbprojects.dot.be> - 2015-02-12 08:20 +0000
Re: DBServer - saving changes without Commit during app crash Robert Pope <cooeee@gmail.com> - 2015-02-13 02:14 -0800
| From | Robert Pope <cooeee@gmail.com> |
|---|---|
| Date | 2015-02-10 05:39 -0800 |
| Subject | DBServer - saving changes without Commit during app crash |
| Message-ID | <dd71ba2e-31e2-43f7-8ef9-f1f189ccef76@googlegroups.com> |
Hi,
I have an app that is attempting to make updates to a DBServer. An exception is being thrown during a FieldPut, which does not get handled and results in a application crash. Commit() is not being called.
The problem that I am having is that any pending change in the DBServer, on any fields that are written to prior to the failing one, on the same record, are being saved.
I have found that the record is being saved by Axit() on DBServer during app teardown. The following line specifically:
(SELF:wWorkArea)->(VODBCloseArea( ))
Is there a way to stop the record being updated? I only want the update to occur if I have called Commit().
[toc] | [next] | [standalone]
| From | "Jamal Assaf" <someone@example.com> |
|---|---|
| Date | 2015-02-10 17:47 -0500 |
| Message-ID | <mbe1p5$prl$1@speranza.aioe.org> |
| In reply to | #7734 |
DBServer does not have a "Rollback" feature like SQL. You probably can
implement it yourself by creating a PreUpdateBufferArray and trap any errors
using an errorblock sequence. If any errors occur during the fieldput
operations, rollback the changes by writing back the PreUpdateBufferArray to
the same record that just got updated.
Note: DBServer:ConcurrencyControl should be set to CCNONE and you must
handle record lock/unlock.
Jamal
"Robert Pope" wrote in message
news:dd71ba2e-31e2-43f7-8ef9-f1f189ccef76@googlegroups.com...
Hi,
I have an app that is attempting to make updates to a DBServer. An exception
is being thrown during a FieldPut, which does not get handled and results in
a application crash. Commit() is not being called.
The problem that I am having is that any pending change in the DBServer, on
any fields that are written to prior to the failing one, on the same record,
are being saved.
I have found that the record is being saved by Axit() on DBServer during app
teardown. The following line specifically:
(SELF:wWorkArea)->(VODBCloseArea( ))
Is there a way to stop the record being updated? I only want the update to
occur if I have called Commit().
[toc] | [prev] | [next] | [standalone]
| From | Martin <spam@spam.spam> |
|---|---|
| Date | 2015-02-11 15:55 +0000 |
| Message-ID | <mbftut$l7u$2@dont-email.me> |
| In reply to | #7734 |
Easy, use this Transaction processing The Advantage Visual Objects and Vulcan.NET RDDs support transaction processing (TPS). The function AX_Transaction() with one of the parameters AX_BEGIN_TRANSACTION, AX_COMMIT_TRANSACTION, or AX_ROLLBACK_TRANSACTION control TPS. AX_Transaction() returns True if it is successful and False otherwise. If the argument is AX_ISACTIVE_TRANSACTION, the function returns True if a transaction is currently active. For a detailed description of the Advantage Transaction Processing System, see Transaction Processing System. On 10/02/2015 13:39, Robert Pope wrote: > Hi, > > I have an app that is attempting to make updates to a DBServer. An exception is being thrown during a FieldPut, which does not get handled and results in a application crash. Commit() is not being called. > > The problem that I am having is that any pending change in the DBServer, on any fields that are written to prior to the failing one, on the same record, are being saved. > > I have found that the record is being saved by Axit() on DBServer during app teardown. The following line specifically: > > (SELF:wWorkArea)->(VODBCloseArea( )) > > Is there a way to stop the record being updated? I only want the update to occur if I have called Commit(). >
[toc] | [prev] | [next] | [standalone]
| From | "Dirk (Belgium)" <dirk.dot.herijgers@pbprojects.dot.be> |
|---|---|
| Date | 2015-02-12 08:20 +0000 |
| Message-ID | <mbhnou$cjh$1@dont-email.me> |
| In reply to | #7734 |
Hi Robert, When writing to a DBServer with FieldPut(), the buffer in the RDD-layer becomes 'hot'. So, when you close the DBServer, or when the Axit()-method or any movement method is called, the RDD-layer will flush the buffer to the file to becomes 'cold'. I only believe that a Refresh() or Skip(0) will reread the buffer again, and make the buffer 'cold' without flushing the 'hot' buffer. Have a try, success, Dirk (Belgium) ==================================================== Robert Pope wrote: > Hi, > > I have an app that is attempting to make updates to a DBServer. An > exception is being thrown during a FieldPut, which does not get > handled and results in a application crash. Commit() is not being > called. > > The problem that I am having is that any pending change in the > DBServer, on any fields that are written to prior to the failing one, > on the same record, are being saved. > > I have found that the record is being saved by Axit() on DBServer > during app teardown. The following line specifically: > > (SELF:wWorkArea)->(VODBCloseArea( )) > > Is there a way to stop the record being updated? I only want the > update to occur if I have called Commit(). --
[toc] | [prev] | [next] | [standalone]
| From | Robert Pope <cooeee@gmail.com> |
|---|---|
| Date | 2015-02-13 02:14 -0800 |
| Message-ID | <8cf50312-9ff6-4d9f-8ec1-6f121b22a0df@googlegroups.com> |
| In reply to | #7734 |
On Wednesday, February 11, 2015 at 12:39:40 AM UTC+11, Robert Pope wrote: > Hi, > > I have an app that is attempting to make updates to a DBServer. An exception is being thrown during a FieldPut, which does not get handled and results in a application crash. Commit() is not being called. > > The problem that I am having is that any pending change in the DBServer, on any fields that are written to prior to the failing one, on the same record, are being saved. > > I have found that the record is being saved by Axit() on DBServer during app teardown. The following line specifically: > > (SELF:wWorkArea)->(VODBCloseArea( )) > > Is there a way to stop the record being updated? I only want the update to occur if I have called Commit(). Thanks for each reply. They were all helpful. I ended up catching the exception with a BEGIN / END SEQUENCE and deleting the record that was being appended. It seems to work ok.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web