• Lowell (7/1/2013)


    i'm guessing since you are using powershell to substitute values, the date parameter must be in single quotes;

    also, it looks like $Date_Import would get substituted too, which makes an invalid query?

    i think it's $Date_Import gets substituted with empty string, plus maybe the date issue? :

    value = 07/01/2013

    vs

    value = '07/01/2013'

    not sure why the value 16 is an error, though? is it really this is the problem?

    Count_Fault=$Count_Import

    $Command.CommandText ="update TBL_IMPORT set Count_Fault=$Count_Import where $Date_Import=$date_used"

    i think it needs to be this: the change is sublte:

    $Command.CommandText ="update TBL_IMPORT set Count_Fault=$Count_Import where Date_Import='$date_used'"

    Thx it works fine 🙂