c# - OleDB Could Not Determine the Decimal Value -
i trying table foxpro c#
. using following statement;
sqlcmd.commandtext = @"select ew.ew_pplid, ew.ew_name, ew.ew_from, ew_to, ew.ew_totdays empwork ew inner join employs emp on ew.ew_pplid = emp.em_pplid emp.em_netname not '' , trim(emp.em_netname) <> '' , emp.em_type <> 2 , ew.ew_from > ?"; sqlcmd.parameters.addwithvalue("pdate", convert.todatetime("01/08/2016"));
but getting error have never seen before;
the provider not determine decimal value. example, row created, default decimal column not available, , consumer had not yet set new decimal value.
has seen error before, , if how can around this?
if if choking on date time false message, try slight alteration via
, ew.ew_from > ctod( ? )";
and parameter string of date
sqlcmd.parameters.addwithvalue("pdate", "01/08/2016" );
vfp's command ctod() means character-to-date, , since in expected month/day/year format, should go through.
if failure on field such "ew.ew_totdays", start updating query limit fields returned id key, leave clause alone. if goes through, add 1 field @ time. may have null value somewhere in data.
if fields ok, might have apply query based on clause , stripping criteria 1 part @ time until applied.
Comments
Post a Comment