Inserting long strings into CLOB column

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

  1. #1

    Default Inserting long strings into CLOB column

    I have a chunk of text data that exceeds 4k bytes. I've created a table that
    has a column defined to be a CLOB. I'm using Oracle 8i and trying to insert
    records into this CLOB column. When I insert rows, a bunch go in but then I
    get the error: [Macromedia][Oracle JDBC Driver]long (>4k) parameters are only
    allowed in the values list of simple insert/update statements The error
    occurred in ...(removed)/import_faqs.cfm: line 151 149 : '#SW#', 150 :
    '#WAN#', 151 : <cfif FinalSol neq ''><cfqueryparam cfsqltype='CF_SQL_CLOB'
    value='#FinalSol#'><cfelse>empty_clob()</cfif> 152 : ) 153 : </cfquery>
    INSERT INTO faq (qid, question, created_date, modified_date, description,
    hardware, keywords, os, software, webagent_note, solution) VALUES ( 'S10072',
    'What can I do if my license file is not working (param 1) ',
    TO_DATE('2001-08-31','YYYY-MM-DD'), TO_DATE('2004-04-08','YYYY-MM-DD'),
    'Situation: My software will not run properly because of a license problem.
    Discussion: The current software requires a license based on the volume serial
    number of your primary (C:) hard disk drive. A Windows environment variable is
    used to locate the file containing the license information.', '', '', 'Windows
    NT 4.0,Windows 95,Windows 98,Windows 2000 Professional', 'ispLEVER Features
    Licensing,Licensing,ispLEVER,software,downloads,se rvice pack,ispdesign,isplever
    starter,update,lever,isplever-starter,starter,isplever
    v3.1,ispDesignExpert,ispexpert,ispdesign,design expert,isp design
    expert,designexpert,ispdesign expert,ispDesignEXPERT', '', (param 2) )
    DATASOURCE dweb SQLSTATE HY004 What is a 'simple' insert? Why is it
    choking?

    cfcoder2 Guest

  2. Similar Questions and Discussions

    1. long query time, oracle clob data type
      I am getting some very long query times (+8 hours) on a very simple query where the fields are not null. This is using ColdFusion MX7, just a...
    2. Inserting into a CLOB in ASP
      Hello, Does anyone know how to insert into an Oracle CLOB field in ASP? I was able to read from the CLOB field by using the GetChunk method - for...
    3. #25112 [Fbk]: SQLExecDirect error with CLOB column in SQL
      ID: 25112 Updated by: sniper@php.net Reported By: gms08701 at yahoo dot com Status: Feedback Bug Type: ...
    4. #25112 [Opn->Bgs]: SQLExecDirect error with CLOB column in SQL
      ID: 25112 Updated by: sniper@php.net Reported By: gms08701 at yahoo dot com -Status: Open +Status: ...
    5. Inserting a binary file into a Long Raw column
      Hi Is there anybody who can give me some sample code for inserting a large binary file into a LONG RAW column? I have managed to do it if the...
  3. #2

    Default Re: Inserting long strings into CLOB column

    I know this comes a bit late but i found this posting and wished someone had
    replied to it so here goes.

    We were getting the error:

    [Macromedia][Oracle JDBC Driver]long (>4k) parameters are only allowed in the
    values list of simple insert/update statements

    I had this problem doing updates and inserts with clobs using MX7 and Oracle
    8.17 - turned out it was my understanding of what a simple insert/update
    statement' was that was causing the issue.

    We were using using table names which were set as variables elsewhere in the
    app.
    for example <cfset tablename = "Mydatasource.CONTENT a">

    This meant the query was something like: UPDATE Mydatasource.content a SET
    field1 = #form.value1# WHERE a.id = #form.id#

    Simply changed it to:

    <cfset tablename = "Mydatasource.CONTENT ">

    Which produces:

    'UPDATE Mydatasource.content SET field1 = #form.value1# WHERE id = #form.id#

    And it worked

    So removing the alias 'a' fixed the problem.

    Hope this helps someone



    davidsharpe 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