I use an application that connects to a SqlAnywhere 11 server/database by issuing the following command (taken from the ConsoleLogFile):
I'd like to emulate the way the application issues the Most importantly I'd like to prevent a So, how do I execute unprepared statements and/or prevent rollbacks on errors? |
If the goal is to prevent a ROLLBACK of uncommitted transactions at the last time the database went down, the short answer is that you can't. The long answer is that even if you could, you'd have to deal with potential database issues like check constraints and referential integrity (specifically if wait_for_commit is used). However, you may be able to regain some of this data by applying translated SQL for those uncommitted transactions against the database manually. 1
If you believe you have a big transaction that didn't complete you could always pull out the details from the transaction log using the dbtran utility. See dbtran -s -a to get at the SQL (and then change the rollback to be a commit and resubmit after the database recovers.
(05 Nov '14, 17:58)
Nick Elson S...
|
What exact problem are you facing - what's the link between START DATABASE and a rollback? Are you trying to start a database and that should not have an impact on the current transaction? (I don't know if it does, at least START DATABASE should not do an auto-commit.)
Just as a general hint: There are several ways to prevent an impact of operations on the current transaction, e.g.:
I asked a similar question related to this issue on StackOverflow: http://stackoverflow.com/questions/26742883/execute-sqlanywhere-11-command-without-rollback-on-windows-using-the-utility-db. I'll update this question with more details in a moment