From users-return-3507-archive-asf-public=cust-asf.ponee.io@groovy.apache.org Thu May 10 20:03:06 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id BD863180718 for ; Thu, 10 May 2018 20:03:05 +0200 (CEST) Received: (qmail 29721 invoked by uid 500); 10 May 2018 18:03:04 -0000 Mailing-List: contact users-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@groovy.apache.org Delivered-To: mailing list users@groovy.apache.org Received: (qmail 29711 invoked by uid 99); 10 May 2018 18:03:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 May 2018 18:03:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 44AA51A1977 for ; Thu, 10 May 2018 18:03:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.612 X-Spam-Level: ** X-Spam-Status: No, score=2.612 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, URI_HEX=1.313] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id Z79zsfK9m2Ah for ; Thu, 10 May 2018 18:03:01 +0000 (UTC) Received: from mx09lb.world4you.com (mx09lb.world4you.com [81.19.149.119]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 8E9CB5F242 for ; Thu, 10 May 2018 18:03:01 +0000 (UTC) Received: from [84.112.214.51] (helo=[192.168.0.26]) by mx09lb.world4you.com with esmtpsa (TLSv1.2:DHE-RSA-AES256-SHA:256) (Exim 4.84_2) (envelope-from ) id 1fGpu1-0001Io-EU; Thu, 10 May 2018 20:02:53 +0200 Subject: Re: Question: Updating a database table To: users@groovy.apache.org, Avinash Nanda References: <1525968512105-0.post@n5.nabble.com> From: MG Message-ID: <0bfe5c1d-a868-1387-e35e-b3fb36a4a51f@arscreat.com> Date: Thu, 10 May 2018 20:02:51 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------41C9ABDE3152AC7D0AF0E273" Content-Language: en-US X-SA-Do-Not-Run: Yes X-AV-Do-Run: Yes X-SA-Exim-Connect-IP: 84.112.214.51 X-SA-Exim-Mail-From: mgbiz@arscreat.com X-SA-Exim-Scanned: No (on mx09lb.world4you.com); SAEximRunCond expanded to false This is a multi-part message in MIME format. --------------41C9ABDE3152AC7D0AF0E273 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit final Sql sql = ... sql.setEnableMetaDataChecking(false) (Also see the comment by Saravanan Subiramaniam at the end of the comments section; have not tried this myself...) Cheers, mg On 10.05.2018 18:15, Avinash Nanda wrote: > Unfortunately i couldnt combine the queries as i have logic which > determines what data to update. > > Also i tried looking at the below link but could know where i need to > update the flag: > https://issues.apache.org/jira/browse/GROOVY-8397?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel&focusedCommentId=16273333#comment-16273333 > > > Sorry i tried googling around the issue but didnt find anything relavent > > On Thu, May 10, 2018 at 12:08 PM, Daniel.Sun > wrote: > > Hi Avinash, > > FYI, > https://issues.apache.org/jira/browse/GROOVY-8397?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel&focusedCommentId=16273333#comment-16273333 > > https://stackoverflow.com/questions/12192592/java-sql-sqlexception-ora-01000-maximum-open-cursors-exceeded > > > In addition, I suggest you try to combine update statement and select > statement and execute only one statement, or write an anonymous block > `BEGIN...END` to finish your query and update. > > Cheers, > Daniel.Sun > > > > -- > Sent from: > http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html > > > > > > -- > Regards > Avinash --------------41C9ABDE3152AC7D0AF0E273 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit final Sql sql = ...
sql.setEnableMetaDataChecking(false)

(Also see the comment by Saravanan Subiramaniam at the end of the comments section; have not tried this myself...)

Cheers,
mg


On 10.05.2018 18:15, Avinash Nanda wrote:
Unfortunately i couldnt combine the queries as i have logic which determines what data to update.

Also i tried looking at the below link but could know where i need to update the flag: 

Sorry i tried googling around the issue but didnt find anything relavent

On Thu, May 10, 2018 at 12:08 PM, Daniel.Sun <sunlan@apache.org> wrote:
Hi Avinash,

FYI,
https://issues.apache.org/jira/browse/GROOVY-8397?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel&focusedCommentId=16273333#comment-16273333
https://stackoverflow.com/questions/12192592/java-sql-sqlexception-ora-01000-maximum-open-cursors-exceeded

In addition, I suggest you try to combine update statement  and select
statement and execute only one statement, or write an anonymous block
`BEGIN...END` to finish your query and update.

Cheers,
Daniel.Sun



--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html



--
Regards
Avinash

--------------41C9ABDE3152AC7D0AF0E273--