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

Home -> Community -> Usenet -> c.d.o.server -> Pro*C "Long" problem

Pro*C "Long" problem

From: Ho Wai Tak <wtho1_at_news.netvigator.com>
Date: 1998/03/09
Message-ID: <6e0bf5$mra$1@imsp009a.netvigator.com>#1/1

Dear all,

   I have defined a PL/SQL block as follow. However, the long field is not as expected long. e.g.5000 or 7000 characters long in the Table PKG. When It fetchs to cursor, it is confined to 2000 character when I print it or using strlen() to return the length of the field in C program. Any idea ? Did I declare the wrong datatype to store the long value ? Thanks in advance,

Victor



 Host variable:

 EXEC SQL BEGIN DECLARE SECTION;
   char pkg_dscr [32760];
 EXEC SQL END DECLARE SECTION;  EXEC SQL EXECUTE
    BEGIN

     DECLARE
        CURSOR pkg_dscr IS
          SELECT pkg_dscr from PKG
          WHERE  pkg_dscr is not null;
        v_pkg_dscr LONG;
      BEGIN
        OPEN c_pkg_dscr;
        LOOP
          FETCH c_pkg_dscr into v_pkg_dscr, :bl_no_uid;
          EXIT WHEN c_pkg_dscr%NOTFOUND;
          :pkg_dscr := v_pkg_dscr;
        END LOOP;
      END;

    END;
  END-EXEC; Received on Mon Mar 09 1998 - 00:00:00 CST

Original text of this message

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