Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 31376 invoked from network); 18 Jan 2007 20:34:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jan 2007 20:34:33 -0000 Received: (qmail 37260 invoked by uid 500); 18 Jan 2007 20:34:38 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 37221 invoked by uid 500); 18 Jan 2007 20:34:38 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 37210 invoked by uid 99); 18 Jan 2007 20:34:38 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Jan 2007 12:34:38 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of bojan@rexursive.com designates 203.171.74.242 as permitted sender) Received: from [203.171.74.242] (HELO beauty.rexursive.com) (203.171.74.242) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Jan 2007 12:34:29 -0800 Received: from [172.27.0.24] (shrek.rexursive.com [172.27.0.24]) by beauty.rexursive.com (Postfix) with ESMTP id E5FBE2540AB; Fri, 19 Jan 2007 07:34:06 +1100 (EST) Subject: Re: DBD: Prepared statements, BLOBs etc. From: Bojan Smojver To: Geoffrey Giesemann Cc: dev@apr.apache.org In-Reply-To: <20070118031707.GA7857@cs.rmit.edu.au> References: <1155589108.3289.26.camel@shrek.rexursive.com> <44EF3BEF.7060901@pearsoncmg.com> <1156537930.2596.1.camel@shrek.rexursive.com> <20060831092218.nh0wn8ls00cg0c88@www.rexursive.com> <20060904084356.7prsyaa30g4kok08@www.rexursive.com> <44FE6D0B.90004@pearsoncmg.com> <20070115130619.1mmlk8lc00gk808c@www.rexursive.com> <1169087869.2974.99.camel@shrek.rexursive.com> <20070118031707.GA7857@cs.rmit.edu.au> Content-Type: text/plain Date: Fri, 19 Jan 2007 07:34:06 +1100 Message-Id: <1169152446.2974.114.camel@shrek.rexursive.com> Mime-Version: 1.0 X-Mailer: Evolution 2.8.2.1 (2.8.2.1-3.fc6) Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Thu, 2007-01-18 at 14:17 +1100, Geoffrey Giesemann wrote: > Can you try: > > INSERT INTO Print_media(Product_id, Ad_id, Ad_sourcetext VALUES > (2004, 1, TO_LOB(:SRCTXT)) > ^^^^^^ > instead? Unfortunately, changing SQL wasn't an option, as this is something users carve by hand and give to APU DBD. The goal is that it should "just work", for most common cases. > This suggests that the implicit data type for :SRCTXT is a LONG (for > some reason). Is there a more specific bind type you could use? (other > than SQLT_CHR) The fix was actually to use types depending on the nature of LOB. For CLOBs, either SQLT_CHR or SQLT_LNG worked fine. But for BLOBs, one needs to use SQLT_LBI (or maybe something else I'm yet unaware of). And since my test table had a mix of both and Oracle wouldn't tell me on which column the problem actually was, plus the fact that I didn't find the SQLT_LBI mentioned anywhere in the docs, it took a while to figure things out. Thanks for your help, -- Bojan