Ask a Question related to Coldfusion Database Access, Design and Development.
-
Tim_Mar #1
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
-
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... -
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... -
#25695 [Opn->Bgs]: Stack overflow
ID: 25695 Updated by: magnus@php.net Reported By: omar at the-one dot ca -Status: Open +Status: ... -
#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... -
#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: ... -
zoeski80 #2
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
-
Tim_Mar #3
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
-
sdupre #4
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
-
Tim_Mar #5
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
-
mxstu #6
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



Reply With Quote

