Hi,i want to update my table Field Date_Import=get-date -f (without time)TBL_Import [Count_Import] int NULL,[Count_Fault] int NULL,[Date_Import] date NULL$Command = $Connection.CreateCommand() $Count_Fault = $directory_file_count $Date_used = get-date $Command.CommandText ="update TBL_IMPORT set Count_Fault=$Count_Import where $Date_Import=$date_used" $Command.ExecuteNonQuery() $Connection.Close()What is wrong in my code ? the Problem is on where clause ..Many THXI get this Msg: Ausnahme beim Aufrufen von "ExecuteNonQuery" mit 0 Argument(en): "Incorrect syntax near '16'."Bei D:\Skripte\Count_Fault.ps1:54 Zeichen:27+ $Command.ExecuteNonQuery <<<< () + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : DotNetMethodException
↧