Stack Overflow in Insert query

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

  1. #1

    Default Stack Overflow in Insert query

    Hello,

    I'm adding just two fields to an existing form that then inserts the data in
    to a table (as attached). I get a stack overflow error in the insert FRom CF
    not JDBC (the insert statement gets cut off at about 75%) when executed either
    as SQL or just text. I could split the data but I've never had to limit the
    length of SQL in any DB/IDE. It there a limit and if so what are the best
    proactices for solving this... or do I need a patch.

    The error:

    Error Occurred While Processing Request
    Java bean field access exception.
    An exception occurred while calling the get or the put function. FieldName is
    Classes. Possible cause . The cause of this exception was that:
    java.lang.StackOverflowError.

    Thanks in advance.

    Tim



    <cfquery name="InsertMove" datasource="EmpChange">
    Insert into TblMoveInfo

    (LAST_nm,FIRST_nm,MI,Empl_Nbr,Type,DEPT_NBR,EFF_DT E,JOB_CLASS,CONDITION_DE
    SC,LOCATION,SUPV_EMPL_NBR,SUPV_PHONE,NEW_DEPT_NBR, NEW_LOCATION,

    NEW_SUPV_EMPL_NBR,NEW_SUPV_PHONE,COMMENTS,Updated_ DTE,Phone_Required,VM_Re
    quired,Cell_Required,Computer_Required,

    Network_Required,GW_Required,Officespace_Required, Requestor_NM,Requestor_E
    mail)
    Values
    ('#form.last_nm#','#form.first_nm#','#form.mi#','# form.Empl_Nbr#','Move','#form.
    dept_nbr#',###dateformat(right(trim(form.eff_dte), len(form.eff_dte)-5))###,

    '#form.job_class#','#form.condition_desc#','#form. location#','#form.Supv_e
    mpl_nbr#','#form.SUPV_PHONE#','#form.NEW_DEPT_Nbr# ','#form.NEW_LOCATION#',

    '#form.NEW_SUPV_NBR#','#form.NEW_SUPV_PHONE#','#fo rm.COMMENTS#',###datefor
    mat(now())###,'#form.Phone_isRequired#','#form.VM_ isRequired#',

    '#form.Cell_isRequired#','#form.Computer_isRequire d#','#form.Network_isReq
    uired#','#form.GW_isRequired#','#form.Officespace# ','#Requestor_NM#','#Requestor
    _Email#')
    </cfquery>

    Tim_Mar Guest

  2. Similar Questions and Discussions

    1. Stack Overflow Error - Need Help!
      We have a server on which we are running CF MX 7 Enterprise. It is a Windows 2000 Server (service pack 4). It is talking to a SQL Server 2000...
    2. PARI stack overflow during long Net::SFTP connection
      , who wrote in article <4df5f522.0407160120.1109ce0d@posting.google.com>: The hint is for GP/PARI. I'm not sure that allocatemem() is supported...
    3. #25695 [Opn->Bgs]: Stack overflow
      ID: 25695 Updated by: magnus@php.net Reported By: omar at the-one dot ca -Status: Open +Status: ...
    4. #25695 [NEW]: Stack overflow
      From: omar at the-one dot ca Operating system: Windows 2000 Advanced Server PHP version: 4.3.3 PHP Bug Type: Unknown/Other...
    5. #22950 [Asn->WFx]: Stack overflow with IIS, ISAPI
      ID: 22950 Updated by: edink@php.net Reported By: heyjohnlim at yahoo dot com -Status: Assigned +Status: ...
  3. #2

    Default Re: Stack Overflow in Insert query

    Hi Tim

    Have you tried outputting what the values of all the fileds are and viewing
    the whole insert statement to make sure it is in the correct format.

    Why have you got extra # marks around the dateFormat fields? I have found that
    some databases need the dates to be in ODBCDateFormat rather the just
    DateFormat to work properly.
    Also might want to check that 'Type' isn't a reserved word cos it is in some
    databases.

    Zoe

    zoeski80 Guest

  4. #3

    Default Re: Stack Overflow in Insert query

    Zoe,

    Thanks for the reply. This is just an Access backend. (that was working fine
    with "Type" and the triple # date formats). The evaluared insert statement does
    look fine (to me) as text (displayed before the CFQUERY call) but it is cut off
    about 3/4 of the string. This is why I'm bettting there's some limit to the
    length of a SQL command.

    Tim_Mar Guest

  5. #4

    Default Re: Stack Overflow in Insert query

    Can you send me an example that fails (cut-and-paste from the debug output so we have all the data).

    Stephen Dupre
    Macromedia QA
    sdupre Guest

  6. #5

    Default Re: Stack Overflow in Insert query

    I actually solved it I think. CF wanted the SQL in shorter lines. It might be a
    best practice but I think it's more difficult to read.

    Insert into TblMoveInfo

    (LAST_nm,FIRST_nm,MI,Empl_Nbr,Type,DEPT_NBR,EFF_DT E,JOB_CLASS,CONDITION_DE
    SC,LOCATION,SUPV_EMPL_NBR,SUPV_PHONE,NEW_DEPT_NBR, NEW_LOCATION,

    NEW_SUPV_EMPL_NBR,NEW_SUPV_PHONE,COMMENTS,Updated_ DTE,Phone_Required,VM_Re
    quired,Cell_Required,Computer_Required,

    Network_Required,GW_Required,Officespace_Required, Requestor_NM,Requestor_E
    mail)
    Values
    ('#form.last_nm#','#form.first_nm#','#form.mi#','# form.Empl_Nbr#','Move','#form.
    dept_nbr#',###dateformat(right(trim(form.eff_dte), len(form.eff_dte)-5))###,

    '#form.job_class#','#form.condition_desc#','#form. location#','#form.Supv_e
    mpl_nbr#','#form.SUPV_PHONE#','#form.NEW_DEPT_Nbr# ','#form.NEW_LOCATION#',

    '#form.NEW_SUPV_NBR#','#form.NEW_SUPV_PHONE#','#fo rm.COMMENTS#',###datefor
    mat(now())###,'#form.Phone_isRequired#','#form.VM_ isRequired#',

    '#form.Cell_isRequired#','#form.Computer_isRequire d#','#form.Network_isReq
    uired#','#form.GW_isRequired#','#form.Officespace# ','#Requestor_NM#','#Requestor
    _Email#')

    Tim_Mar Guest

  7. #6

    Default Re: Stack Overflow in Insert query

    Tim_Mar

    I could be wrong, but is that any different than the query in your first post?


    Also, exactly how many characters were you talking about? At what point in
    the SQL statement did it cut off ... ie. after 5001 characters ?

    mxstu 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