IMHO, cfinsert should never be used. If you want to get an error that's
readable and actually get to learn how databases work, use SQL.
Here's a start
<cfquery datasource="#Application.DSN#">
insert into retailattributes
(anchor1,anchor2,anchor3,trafficcountNS,trafficcountEW,parkingratio,propidnu
mber,radius1,population1,HH1,HHincome1,radius2,population2,HH2,HHincome2,rad
ius3,population3,HH3,HHincome3)
values
('#FORM.anchor1#','#FORM.anchor2#','#FORM.anchor3#','#FORM.trafficcountNS#',
'#FORM.trafficcountEW#','#FORM.parkingratio#','#FORM.propidnumber#','#FORM.r
adius1#','#FORM.population1#','#FORM.HH1#','#FORM.HHincome1#','#FORM.radius2
#','#FORM.population2#','#FORM.HH2#','#FORM.HHincome2#','#FORM.radius3#','#F
ORM.population3#','#FORM.HH3#','#FORM.HHincome3#')
</cfquery>
Daniel Elmore
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
Eric C Sandquist
Sent: Monday, February 28, 2005 11:46 AM
To: [email protected]
Subject: String index out of range: -2 null <br>The error occurred on line
28.
I have an application with a series of data collection and insertion pages
ann in the last 2 weeks started receiving this error in my Request Error
template:
Error.Diagnostics: String index out of range: -2 null <br>The error occurred
on line 28.
Line 28 of the code consists of the following:
<CFINSERT datasource="#Application.DSN#" tablename="retailattributes"
formfields="anchor1, anchor2, anchor3, trafficcountNS, trafficcountEW,
parkingratio, propidnumber, radius1, population1, HH1, HHincome1, radius2,
population2, HH2, HHincome2, radius3, population3, HH3, HHincome3">
Has anyone else ever gotten an error such as this? It is just a simple
insert, all the other pages work, It is just this one spot... The database
is in SQL 2K. I can't seem to find reference to -2 anywhere regarding this
message type...
Eric
I am using the free version of SPAMfighter for private users.
It has removed 87253 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!
----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe:
http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:
http://www.dfwcfug.org/form_MemberRegistration.cfm