Hi All,
Having fun this week with SQL commands - I cannot get the bolded text work to update a column named Password in an excel file. If the column is called "uPassword" then it is fine. I tried the Grave ` quote to get around it but does not work.
Seems maybe Password is a reserved word.
Does anyone have any Ideas'
$Batches = 1003, 1004
ForEach ($Batche in $Batches){
$Batche
$strQuery = "Update [$strSheetName] set DisplayName = 'NEw Display name',
Password = 'mypassword' Where Batch = $Batche AND Email = $var1"
$objConn = New-Object System.Data.OleDb.OleDbConnection("$strProvider;$strDataSource;$strExtend")
$sqlCommand = New-Object System.Data.OleDb.OleDbCommand($strQuery)
$sqlCommand.Connection = $objConn
$objConn.open()
$sqlCommand.ExecuteNonQuery()
$objConn.Close()
}