[DB-SIG] How to use DCOracle and LOBs in Oracle 8i ????
Andreas Jung
ajung@sz-sb.de
Fri, 28 Apr 2000 13:17:40 +0200
Return-Path: <python-list-admin@python.org>
Received: from saarland.sz-sb.de by sabsol.sz-sb.de (SMI-8.6/SMI-SVR4)
id MAA08926; Fri, 28 Apr 2000 12:48:35 +0200
Received: from dinsdale.python.org (dinsdale.cnri.reston.va.us [132.151.1.21])
by saarland.sz-sb.de (8.8.8/8.8.8) with ESMTP id MAA16447
for <ajung@sz-sb.de>; Fri, 28 Apr 2000 12:48:33 +0200 (MET DST)
Received: from dinsdale.python.org (localhost [127.0.0.1])
by dinsdale.python.org (Postfix) with ESMTP
id DCA5B1CD70; Fri, 28 Apr 2000 06:48:12 -0400 (EDT)
Delivered-To: python-list@python.org
Received: from saarland.sz-sb.de (saarland.sz-sb.de [212.88.192.10])
by dinsdale.python.org (Postfix) with ESMTP id 2E6401CD5D
for <python-list@python.org>; Fri, 28 Apr 2000 06:48:09 -0400 (EDT)
Received: from milliways.sz-sb.de (milliways.sz-sb.de [10.2.0.64])
by saarland.sz-sb.de (8.8.8/8.8.8) with ESMTP id MAA16378
for <python-list@python.org>; Fri, 28 Apr 2000 12:48:09 +0200 (MET DST)
Received: (from ajung@localhost)
by milliways.sz-sb.de (8.9.3+Sun/8.9.1) id MAA21396
for python-list@python.org; Fri, 28 Apr 2000 12:48:09 +0200 (MET DST)
Date: Fri, 28 Apr 2000 12:48:08 +0200
From: Andreas Jung <ajung@sz-sb.de>
To: python-list@python.org
Subject: How to use DCOracle and LOBs in Oracle 8i ????
Message-ID: <20000428124808.A21389@sz-sb.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.1.11i
Sender: python-list-admin@python.org
Errors-To: python-list-admin@python.org
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.0beta3
Precedence: bulk
List-Id: General discussion list for the Python programming language <python-list.python.org>
After reading old postings concerning DCOracle and LOBs I
can not solve the following problem:
I have a table under Oracle 8i with a NCLOB field. The base
character set for the complete database it UTF8. My first
problem with DCOracle was an ORA-12704 character set mismatch error when
I tried to insert an instance of DCOracle.dbi.dbiRaw() in to the database.
My current code looks like this (the table contains the NCLOB field 'content'):
lob = 'very long text .....'
raw = DCOracle.dbi.dbiRaw(lob)
com = 'insert into tab (docnum,content) values(:x,translate(:y using nchar_cs))'
curs.execute(com,x='1234',y=raw)
This works for LOBs with less than 4000 bytes. For longer LOBs I get the following error
message: ORA-01461 can bind a LONG value only for insert into a LONG column.
Now...how can I store larger LOBs with more than 4000 bytes ? I have read something
about a dbms_lob package but I have really no idea how to use it.
Has anyone a working solution or a code example ?!
Thanks a lot for any hint,
Andreas
--
http://www.python.org/mailman/listinfo/python-list