August 18, 2009 at 10:17 am
I am using Coldfusion to INSERT and SELECT data. I used a
When I
Conversion failed when converting the varchar value 'RUN' to data type smallint. The data Type is nvarchar(50). WHen I used integer, I got errors. Thanks in advance for any help.
August 18, 2009 at 11:08 am
kabaari (8/18/2009)
I am using Coldfusion to INSERT and SELECT data. I used a to do this:
When I <cfdump> this, it works. The empty values return [empty string]. But when I run it to INSERT then, I get this:
Conversion failed when converting the varchar value 'RUN' to data type smallint. The data Type is nvarchar(50). WHen I used integer, I got errors. Thanks in advance for any help.
Lowell
August 18, 2009 at 12:20 pm
Lowell,
INSERT INTO tbl_Assembly_Production(dateProd, Shift, Area, Jig, EmpNo, WorkOrder, Item, ProdTime, CoTime, NpTime, UnitsProd, ProdDelayTime, CoDelayTime, Comment)
VALUES('#Trim(FORM.dateProd)#',
'#Trim(FORM.Shift)#',
'#Trim(FORM.Area)#',
'#Trim(FORM.jig)#',
'#Trim(FORM.EmpNo)#',
'#Trim(FORM.WorkOrder)#',
'#Trim(FORM.Item)#',
'#Trim(FORM.ProdTime)#',
'#Trim(FORM.CoTime)#',
'#Trim(FORM.NpTime)#',
'#Trim(FORM.UnitsProd)#',
'#Trim(FORM.ProdDelayTime)#',
'#Trim(FORM.CoDelayTime)#',
'#Trim(FORM.Comment)#')
SELECT workOrder
FROM tbl_Assembly_Production
SELECT WorkOrder
FROM dbo.tbl_Assembly_Production
WHERE WorkOrder =
INSERT INTO tbl_Assembly_Delay
(Code, DelayTime)
VALUES('#Trim(FORM.Code)#',
'#Trim(FORM.DelayTime)#')
August 18, 2009 at 2:11 pm
Lowell,
I ran your code as is and it did not work. I made the corrections and it still did not work. I changed my code to this:
Only the first line works partially. I can get a zero but, no calculations.
August 18, 2009 at 2:17 pm
kabaari: It would be helpful if you posted using the code blocks. Then your code and data would be visible on the page.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
August 18, 2009 at 8:29 pm
Produce
Do Not Produce
Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply