Menu

#437 Problem with Oracle LONG data types

8.0-Beta
closed
Bug Report
2020-10-21
2020-08-23
No

There is a small (meybe big) problem with the long data type in oracle, displayed in TDBGRID and other similar data controls (eg VirtualDBGrid).
If the query results is more than one row, VirtualDBGrid "scrambles" the results. It looks as if it sometimes truncates TField or confuses others. The only valid TField is the last one on VirtualDBGrid. I haven't been able to work out exactly what the problem is, maybe you can do it. The way to get this problem is simple:
1. Create a table with two columns, one CLOB and one LONG.
2. Fill in the CLOB column with different values (varchar).
3. copy the CLOB column to LONG.
4. Then display the contents of all records using TVirtualDBGrid and the effect will be visible.

I am asking for a solution to the problem, or at least a hint what to do with it.

Best regards,
Piotr Brzeski

Discussion

  • EgonHugeist

    EgonHugeist - 2020-09-08

    Hello Piotr, sorry for the delay i was in hollidays.
    Could you give me a code-sniped for step 3, plz? It's uncleare how you're copying the clob to the Long field...
    Which compiler do you use? Which SVN location: trunk or testing-7.3?
    Note: i'm not willing using non standart components.
    To get you ticket resolved quickly, just write a little test program whith a create&data-population script..
    Regards, Michael

     
  • EgonHugeist

    EgonHugeist - 2020-09-24

    Ping...

     
  • EgonHugeist

    EgonHugeist - 2020-09-24
    • assigned_to: EgonHugeist
     
  • Piotr Brzeski

    Piotr Brzeski - 2020-09-28

    Hello,
    Sorry for the delay, I didn't have time to reply. The problem is with whatever GRID I use. Even with the standard TDBGrid. I can't drop the code because I reverted my ZEOS components to 7.3.0-alpha and switched IDE to CodeTyphon - the problem is no more. For a while I used the test version, the latest one available at the time. I was using the IDE Lazarus 2.0.4 with the FPC 3.0.4 compiler. Step 3:

    create table test_long (
      text varchar2(4000),
      clobek clob,
      longek long
    );
    
    insert into test_long(text)
    select 'ASD' from dual
    union all
    select 'ASDF' from dual
    union all
    select 'QWERT' from dual
    
    update test_long set clobek = text
    
    update test_long set longek = clobek
    
    commit
    
    select * from test_long
    

    and after fill up to DBGrid, the more records, the bigger Mexico.

     
  • EgonHugeist

    EgonHugeist - 2020-09-29

    Honestly Oracle did deprecate the raw types, such as long, since V8. Reason is the unknown encoding and the overdozed buffer(total size is unknown) we guess to get the date fetched withoutgetting a trunkation error. However i'll check your example. And give you a reply.
    Regards, Michael

     
  • EgonHugeist

    EgonHugeist - 2020-09-30
    • labels: --> Oracle, long
    • Milestone: 7.3-alfa --> 7.3-Beta
     
  • EgonHugeist

    EgonHugeist - 2020-09-30

    Hello Piotr,
    i was able to fix the regression with the given example.
    See R6874 and a test R6875

    Please test and close if OK,
    Regards, Michael

     
  • Piotr Brzeski

    Piotr Brzeski - 2020-10-08

    Hello Michael,
    Thanks for fast fix. Now it's OK.

    Regards, Piotr Brzeski

     
  • EgonHugeist

    EgonHugeist - 2020-10-08
    • status: open --> closed
     
  • EgonHugeist

    EgonHugeist - 2020-10-08

    Thank your for your confirmation, Michael

     

Log in to post a comment.