Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 621381337B47 for ; Sat, 19 Mar 2011 06:22:37 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 37251-02 for ; Sat, 19 Mar 2011 09:22:28 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-iw0-f174.google.com (mail-iw0-f174.google.com [209.85.214.174]) by mail.postgresql.org (Postfix) with ESMTP id B26F1133740B for ; Sat, 19 Mar 2011 06:22:26 -0300 (ADT) Received: by iwn34 with SMTP id 34so4798052iwn.19 for ; Sat, 19 Mar 2011 02:22:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:user-agent:date:subject:from:to:message-id :thread-topic:in-reply-to:mime-version:content-type :content-transfer-encoding; bh=YreM7qiFTzFDgNoO02zkkQB/gCmqnlUQM4YAzu/5C4k=; b=ZJVcq4M4GkLW69HmCDI9gMcslJ9f7tIjMxY/Vc3MwEnmWNgu49X6qHRY+ZkZ2Tmjg1 OBzy9raP30gjQk9T6jdr6t3LQvY03U3sFp7w44s6HWJo8XhTCk8yEJ8MTFdodHHSdE7o BZxZ+j6mxYL+QqyIpQVCP9jt2YTcu0qazadOo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=user-agent:date:subject:from:to:message-id:thread-topic:in-reply-to :mime-version:content-type:content-transfer-encoding; b=Sj9ggwJi5uqPcP8uwevdMSDjzwril53hyakGBKqCs13j9D3dhMswvKwkPlDceJzpJ9 YhCaZyqr97toBErfbw2EwiECUXMWTPX0LG7CsJRkIIj1Pk2CA02a/xM+VGH993oKrnsd q2wfhaTX8NkBjp7wycnfBMiDXfPlN/dSVnu3E= Received: by 10.42.96.4 with SMTP id h4mr3273031icn.136.1300526546431; Sat, 19 Mar 2011 02:22:26 -0700 (PDT) Received: from [10.0.0.2] ([65.100.168.215]) by mx.google.com with ESMTPS id i2sm2452845icv.15.2011.03.19.02.22.24 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 19 Mar 2011 02:22:24 -0700 (PDT) User-Agent: Microsoft-MacOutlook/14.2.0.101115 Date: Sat, 19 Mar 2011 03:22:18 -0600 Subject: Re: Problem with executeBatch and "A result was returned when none was expected" From: Sean Bowman To: Message-ID: Thread-Topic: [JDBC] Problem with executeBatch and "A result was returned when none was expected" In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.346 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_ENVFROM_END_DIGIT=1.553, FREEMAIL_FROM=0.001 X-Spam-Level: X-Archive-Number: 201103/32 X-Sequence-Number: 21587 SQL databases won't return any data that was created without the RETURNING clause. Also, if you read the original post, you'd see the RETURNING clause gets appended and does just fine when not in batch mode. But that all said, individual SQL execute() statements are fine for the near future. I'll worry about performance when we've got a million customers. On 3/19/11 2:46 AM, "Oliver Jowett" wrote: >There *is* no RETURNING clause in the application's original query >(see the code in the OP), that clause is being added by the driver to >implement Statement.RETURN_GENERATED_KEYS.