Oracle CLOB Columns Failing With ColdFusion 7

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Oracle CLOB Columns Failing With ColdFusion 7

    I am using ColdFusion 7 Enterprise, updater 1 with DataDirect version 3.4
    drivers and Oracle 8i. ColdFusion 7 is returning no data for CLOB datatype
    columns. The ColdFusion 5 version currently in production is successfully
    returning values for these columns. I have changed the datasource to allow
    CLOB support and increased the Long Text buffer to 256000. My largest set of
    data stored is 42000 bytes. I tried turning off CLOB support with the 256000
    Long Text buffer and it still did not work. The only success I have had is
    with an Oracle package called dbms_lob. This package has a Substr( ) function
    which does return data but is limited to only 4000 characters at a time
    (varchar2). E.g. dbms_lob.substr(myCLOBColumn,4000,1). So to extract my data
    would require many output columns that I would then need to concatenate with
    ColdFusion. Concatenating with Oracle does not work since an Oracle varchar2
    can return a maximum of 4000 characters. There is another DBMS_LOB function
    that I used to determine the true length of the data in the CLOB columns:
    DBMS_LOB.GETLENGTH(myCLOBColumn)

    Are there any environmental, driver or other settings that may help with this
    problem?

    Thanks,
    GregK

    GregK Guest

  2. Similar Questions and Discussions

    1. Updating Oracle Clob field
      I am having some trouble updating an oracle db that has a clob field, this is the part of the query that is getting the form data: <cfqueryparam...
    2. Oracle CLOB Truncation > 64K
      We have an update and insert query for a large text field (Oracle CLOB). When we run the query on long text, it truncates the excess. ...
    3. Oracle CLOB Update in CF
      We have a form with two textareas. The action page updates two Oracle clob fields with the content from the textareas. If at least one of the...
    4. ColdFusion+cfquery+Oracle+CLOB+"Query of Query"
      Error message is: Query Of Queries runtime error. Unsupported SQL type "java.sql.Types.CLOB". My database table: RESMIGAZETEFIHRISTI: ...
    5. Oracle CLOB using DBI
      Does someone have a working code sample of Perl/DBI returning a CLOB column from Oracle. Here is what I came up with, I counld not get ORA_CLOB...
  3. #2

    Default Re: Oracle CLOB Columns Failing With ColdFusion 7

    Additional information for this problem: ColdFusion is not returning an empty
    string for CLOB columns. Instead, it is blank- space filling the columns with
    the same number of characters as is contained in the column. Length of the
    data was determined using the function DBMS_LOB.GETLENGTH(myCLOBColumn). So a
    column that has 40000 non-blank characters is being returned by ColdFusion as
    40000 blank spaces.

    GregK Guest

  4. #3

    Default Re: Oracle CLOB Columns Failing With ColdFusion 7

    Greg,

    How did you write information to the CLOB field? I do it all the time. I use a
    stored procedure to write and update the information in the clob. If you need
    an example of the procedure, let me know (personal email) and I will send it to
    you. CLOB fields are tricky to use but they several a very useful purpose.

    drew222 Guest

  5. #4

    Default Re: Oracle CLOB Columns Failing With ColdFusion 7

    The data was written to the CLOB fields with SQL and <cfqueryparam> tags (no
    type= was specified) in ColdFusion 5. ColdFusion 7 is not retrieving the
    values correctly using an SQL Select statement. Unfortunately, writing stored
    procedures is beyond the scope of my CF5 to CF7 migration. I also discovered
    that ColdFusion 7 is having problems updating the CLOB columns using SQL. When
    I use a <cfqueryparam> tag with type=CF_SQL_CLOB or type=CF_SQL_LONGVARCHAR,
    the update fails with the message "No more data available to read" when
    attempting to Update with more than 1333 characters. The Update is successful
    with 1333 or less characters. When I skip using <cfqueryparam> altogether and
    just put the value between single quotes (e.g. '#inputValue#') I can input up
    to 4000 characters before it fails.

    I have tried several versions of the DataDirect drivers up through version 3.5
    and none seem to fix the problem. Throghout the history of ColdFusion I have
    always found tolerable workarounds for bugs but I am really stuck with this
    problem. Maybe migrating to MS SQL Server from Oracle would be the way to go.

    GregK

    GregK Guest

  6. #5

    Default Re: Oracle CLOB Columns Failing With ColdFusion 7

    You are correct in that it may be a driver issue. I would change your driver to
    the Oracle drivers. If you are running Cold Fusion MX 7, you can define the
    Datasource information as OTHER and load the Oracle information from there. I
    have En terprise for my development machine and using the Merchant driver but
    you can also use the JDBC driver from ORacle. Let me know if you need the
    information as to where to find the driver.

    As for moving to SQL Server, that would be a bad idea in my mind. Oracle is
    far more powerful than MS SQL (in my humble opinion).


    drew222 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139