Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Oracle and JDBC insert Question

Oracle and JDBC insert Question

From: SESHAGIRI KODUGANTI <giri_at_newscorp.com>
Date: Fri, 10 Jul 1998 17:28:15 -0400
Message-ID: <6o616n$4k6$1@fisher.nis.newscorp.com>


Hello Folks,

    I am trying to load large chunks of data(text data only) into an Oracle 8.0 database using JDBC thin driver(8.0) thru an applet. The Oracle data type is Long(I mean LONGVARCHAR) which is capable of storing 2 GB of text data. The datatype mapping for this datatype is Java String. But when I try loading data. The driver allows me to insert 4000 bytes only. If I exceed that limit then Oracle throws the following error

java.sql.SQLException: ORA-01704: string literal too long

        at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:184)
        at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:631)
        at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1206)
        at

oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:6 )

        at
oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.j a:761)

        at
oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStateme .java:803)

        at
oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java:1 5)

        at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleState nt.java:1178)

        at
oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.ja :1194)

        at loadtest.ExecuteQuery(loadtest.java:48)
        at loadtest.main(loadtest.java:63)


Now I have to load about 70,000 bytes from an applet. The funny thing is I am able to retreive this amout of data but not able to insert this. I was thinking there is some way of telling the database that I am trying to insert the data into a LONG datatype in Oracle.I guess the driver is defaulting to the VARCHAR instead of LONG. Please let me know if any one of you have any ideas. How do you people insert large Chunks of data ?? Is thin driver Capable of doning such things. Any help in this regard is highly appreciated. Thanks

My Email: giri_at_newscorp.com

-Giri
giri_at_newscorp.com Received on Fri Jul 10 1998 - 16:28:15 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US