| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Pro*C "Long" problem
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
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;
![]() |
![]() |