I'm seeing a missing # sign after Form.Request

-----Original Message-----
From: Bruce Sorge [mailto:sor...@gmail.com] 
Sent: Friday, August 10, 2012 2:28 PM
To: cf-talk
Subject: CFspreadsheet issue


Hello list,
Long time (years) no post. 

I am trying to read from a spreadsheet that is loaded up onto the server and
then insert the information into the database. I have three column headers
called Code, Barcode and ResortID. Code and Barcode have values and ResortID
is empty. The reason that I did this is because I want to insert the
ResortID from a formfield called ResortID. The problem is that I am getting
the error message:
Columc count doesn't match value count at row 1. Here is my code:

<!--- Read the spreadsheet data into a query object ---> <cfspreadsheet
action="read" query="DealsDSN" headerrow="1"
src="#ExpandPath("Spreadsheets/#ClientFile#")#" />

<!--- Loop thorugh the query starting with the first row containing data
(row 2) ---> <cfloop query="MahDSN" startrow="2">

<!--- Insert the code and bar code into the database for future use --->
<cfquery datasource="DealsDSN" result="foobar">
        INSERT INTO BarCodes
        (Code, BarCode, ResortID)
        VALUES
        (
        <cfqueryparam cfsqltype="cf_sql_varchar" value="#Code#">
        <cfqueryparam cfsqltype="cf_sql_varchar" value="#BarCode#">
        <cfqueryparam cfsqltype="cf_sql_int" value="#Form.ResortID">
        )
</cfquery>
</cfloop>

The error is on <cfqueryparam cfsqltype="cf_sql_int" value="#Form.ResortID">

Any assistance is greatly appreciated.


Bruce



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352087
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to