Return-Path: Mailing-List: contact ibatis-user-java-help@incubator.apache.org; run by ezmlm Delivered-To: mailing list ibatis-user-java@incubator.apache.org Received: (qmail 17484 invoked by uid 99); 28 Dec 2004 16:17:32 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of clinton.begin@gmail.com designates 64.233.184.204 as permitted sender) Received: from wproxy.gmail.com (HELO wproxy.gmail.com) (64.233.184.204) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 28 Dec 2004 08:17:29 -0800 Received: by wproxy.gmail.com with SMTP id 57so491080wri for ; Tue, 28 Dec 2004 08:17:27 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=nJ5eipsa6Lv8wf14V4pn9DDiohx8RnpcsfFdvqfyXxcNvs//Y294rLng453eNZVNIKDzamD84ctd5D4JLmpyYuuB6BTjaeV2BBf6yS0WMCjMaawKjOeggO+Pu3tv3YSwIlXMyRaMsAV+HLcdtUBKRGytjTh+tPIar4M2iU38Q4s= Received: by 10.54.35.5 with SMTP id i5mr550117wri; Tue, 28 Dec 2004 08:09:44 -0800 (PST) Received: by 10.54.33.38 with HTTP; Tue, 28 Dec 2004 08:09:44 -0800 (PST) Message-ID: <16178eb10412280809364f7aa3@mail.gmail.com> Date: Tue, 28 Dec 2004 09:09:44 -0700 From: Clinton Begin Reply-To: cbegin@ibatis.com To: ibatis-user-java@incubator.apache.org Subject: Re: Calling a Sybase Store Procedure In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: X-Virus-Checked: Checked You have to run certain SYBASE stored procedures with AutoCommit=ON. However, iBATIS does not support autocommit (by design). So, at this time you'll need to supply your own connection (set autocommit=true) to .setUserConnection(). You can use the same datasource to get a new connection from the SqlMapClient (.getDataSource()), then set autocommit to true, then .setUserConnection(). Just be sure to manage it and close it properly. Sorry for the roundabout solution, I'm looking for a better one. Too bad Sybase does this to us. Cheers, Clinton On Tue, 28 Dec 2004 16:00:25 -0000, Jagadeesan, Siva wrote: > Hi Guys: > > I am having problem when I am trying to call a store procedure through IBatis. > > This is the exception I am getting, > > Caused by: > com.sybase.jdbc2.jdbc.SybSQLException: Stored procedure 'proc_next_id' may be > run only in unchained transaction mode. The 'SET CHAINED OFF' command will > cause the current session to use unchained transaction mode. > > I am able to call this store proc using direct JDBC. > > I think it is something to do with Connection. > > Has anyone came across this problem > > Rgds, > --Siva Jagadeesan > > ============================================================================== > This message is for the sole use of the intended recipient. If you received > this message in error please delete it and notify us. If this message was > misdirected, CSFB does not waive any confidentiality or privilege. CSFB > retains and monitors electronic communications sent through its network. > Instructions transmitted over this system are not binding on CSFB until they > are confirmed by us. Message transmission is not guaranteed to be secure. > ============================================================================== > >