Today’s terribly frustrating error causing a long delay in a short process is:
Parameter index out of range (1 > number of parameters, which is 0).
It is the result of this simple insert:
<cfquery name="createrole" datasource="#application.gDataSrc#">
INSERT INTO #application.projectidentifier#_theroletable {
fooASInt,
barAsInt
} VALUES {
<cfqueryparam cfsqltype="CF_SQL_INTEGER" value="#fooAsIntValue#">,
104
}
</cfquery>
UPDATE: Whoops. I see the typo! There is a big difference between {} and (). Should have been:
<cfquery name="createrole" datasource="#application.gDataSrc#">
INSERT INTO #application.projectidentifier#_theroletable (
fooASInt,
barAsInt
) VALUES (
<cfqueryparam cfsqltype="CF_SQL_INTEGER" value="#fooAsIntValue#">,
104
)
</cfquery>
Well, I mean, duh…
I was typing very fast when I did that 🙂