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
