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 -> Re: Dynamic SQL Pb

Re: Dynamic SQL Pb

From: Ken Denny <kendenny_at_bnr.ca>
Date: 1997/09/05
Message-ID: <341060E8.118@bnr.ca>#1/1

Hi Laurent,

The problem is probably because columns 2, 3, and 5 are VARCHAR2 items. In that case you must provide a length to DEFINE_COLUMN. Try this:

  DBMS_SQL.DEFINE_COLUMN (curseur, 1, nid);
  DBMS_SQL.DEFINE_COLUMN (curseur, 2, nidpath, <max size of nidpath>);
  DBMS_SQL.DEFINE_COLUMN (curseur, 3, name, <max size of name>);
  DBMS_SQL.DEFINE_COLUMN (curseur, 4, itemtype);
  DBMS_SQL.DEFINE_COLUMN (curseur, 5, encode, <max size of encode>);

It would be nice if PL/SQL had the equivalent of a C sizeof construct so you wouldn't have to change this code if you change the max sizes of any of these items, oh well.

Hope this helps
Ken Denny
kendenny_at_bnr.ca Received on Fri Sep 05 1997 - 00:00:00 CDT

Original text of this message

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