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 -> pass java array to xsql

pass java array to xsql

From: Barnoit <jbarney_ca_at_yahoo.ca>
Date: 20 Jun 2003 13:27:36 -0700
Message-ID: <cd2c60c8.0306201227.5f6e103d@posting.google.com>


What I want to do is pass a java array (strings) to an xsql page as bind params. For testing purposes, I've done the following, which works as I need it.

In the jsp, I have a very large string, which I've split in 2 because of size issues (>32k). I then forward the 2 strings to an xsql page, and use them as bind variables. The following is a simplified ex. of the xsql.

<xsql:dml bind-params="name data1 data2"> declare
  data_clob CLOB;
 ...
begin
...
SELECT data // empty clob

     INTO   data_clob
     FROM   table
     WHERE  id=123;

DBMS_LOB.WRITE(data_clob,len,1,:2);
     len := LENGTH(:3);
     IF len > 0 THEN
        DBMS_LOB.WRITEAPPEND(data_clob,len,:3);
     END IF;

As I said, this works fine, but only because I know that I only have 2 strings, which I won't actually know in the production env. So what I've now done in the jsp is created an array (String[] dataArray = new String[x]), which I'd then like to pass as a single parameter to the xsql, and then put it into a varray? and loop through the writeappend section ex. above. Thanks in advance. Received on Fri Jun 20 2003 - 15:27:36 CDT

Original text of this message

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