Home » U++ Library support » U++ SQL » questions about sqlArray
questions about sqlArray [message #35396] |
Thu, 09 February 2012 10:24 |
papascalientes
Messages: 5 Registered: February 2011
|
Promising Member |
|
|
Hello all,
I have to revise an application somebody else wrote. The application is for sqlite databases and uses sqlArray a lot. I never used sqlArray before, therefore I need help concerning two problems.
1. How can I detect if the sqlArray encountered an error so that the application can react according to the errror?
Reason:
If there was an sql error, I get an error message and after that the application crashes sometimes. As far as I understand it, there is an ClearError() in UPP after showing the error message so that I can't use WasError() after a query. My idea was to use WhenPostQuery because it seems not be invoked if there was an error. Is that a good idea or is there a better way?
And what about editing, appending, deleting in the sqlArray? How can I detect an error there?
2. Is there a way to use an exclusive transaction for the sqlArray? Like I can use BEGIN EXCLUSIVE to start an exlusive transaction when using sql commands without sqlArray?
Reason:
In very rare cases it might happen that two applications try to write to the same database at the same time. So we decided that writing to the database always should be done in exclusive transactions, locking the database during the whole writing operation. Editing, appending, deleting in an sqlArray means writing to the database, so I have to find a way to lock the database during the operation.
I would be very glad, if somebody could help me with this problems. Thank you in advance.
Best regards,
Petra
|
|
|
Goto Forum:
Current Time: Fri May 10 09:08:25 CEST 2024
Total time taken to generate the page: 0.03310 seconds
|