Forum Stats

  • 3,836,791 Users
  • 2,262,191 Discussions
  • 7,900,111 Comments

Discussions

LONG datatype showing problem on Datagridview?

858170
858170 Member Posts: 3
edited Oct 18, 2011 7:20AM in .NET Stored Procedures
Hi all,
I have a table on my Oracle 10g database and one of the coulumn type of the table is LONG datatype. Although I can easily bind this field to Richtextbox and update it, I could not show this field on datagridview. I tried something on VS and PL/SQL procedures, but I have not managed to do. Could you inform me how to convert LONG to CHAR by PL/SQL or how to show LONG field on a datagridview please? Thanks in advance...
BR

Answers

  • 895015
    895015 Member Posts: 2
    Check out below code that is used to select the LONG value in to VARCHAR2 variable:



    declare
    a varchar2(20);
    begin
    EXECUTE IMMEDIATE 'SELECT b FROM tt2' INTO a;
    DBMS_OUTPUT.PUT_LINE(a);
    end;



    PL/SQL procedure successfully completed.
This discussion has been closed.