× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I have no experience with MS SQL Server.

But, with the RDMS software I've used, it's possible to set the auto-commit as a connection property. So, when I want to disable it, and use transactions, I will turn off auto-commit in the properties.

There's also a setAutoCommit() method in the java.sql.Connection class that you could (potentially) prototype and use to turn auto commit on and off.

I haven't tested it, but off the top of my head, the prototype would look like this:

D JDBC_setAutoCommit...
D PR ExtProc(*JAVA:
D 'java.sql.Connection':
D 'setAutoCommit')
D autoCommit 1n value

and you call it like:

conn = JDBC_connProp( ... whatever ... );
if conn = *null;
... handle error
endif;

JDBC_setAutoCommit(conn: *off);

Again... this is untested. But may be what you're looking for?


On 9/8/2011 4:16 PM, Gary Thompson wrote:
Charles wrote:

Is the MS SQL Server running in "auto-commit"?

Charles, it looks like you are spot on.

I plan to try some kind of SET statement, but have some confusion
with an MSDN lib article stating:

"When ON, SET IMPLICIT_TRANSACTIONS sets the connection to
implicit transaction mode."
"When OFF, it returns the connection to autocommit transaction
mode."

I prefer something less ambiguous; something not dependent on the current
connection state.

I think am looking for a way to start an "explicit transaction" on Sql
Server.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.