Joined: 09 Jun 2010
Online Status: Offline
Posts: 2
Topic: Problems with command object and parameters Posted: 10 Aug 2010 at 8:53am
Afternoon
I have a command object and am trying to pass a parameter to it. I keep getting the message " conversion failed when converting data and/or time from character string. " The field in the PT_NC is also a datetime field.
The parameters are set up as DateTime. The code that's breaking it is:
isnull ((select sum(nc.qty_rejected) from K6Unipoint_Production.dbo.PT_NC nc where nc.Origin = 'Vendor' and nc.Origin_ref = v.vendor and nc.NCR_Date between convert(datetime,'{?DateFrom}') and convert(datetime, '{?DateTo}')),0)
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum