Anyone ever experience this with an Update Statement
I keep getting this: "syntax error (missing operator) in query expression"
Code:Dim adoConn As New ADODB.Connection Dim adoRS As New ADODB.Recordset adoConn.CommandTimeout = 3 adoConn.ConnectionTimeout = 3 adoConn.CursorLocation = adUseClient adoConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Chr(34) & gstrResultFile & Chr(34) & ";Persist Security Info=False;Extended Properties=" & Chr(34) & "Excel 8.0;HDR=Yes" & Chr(34) 'This works fine 'pi_strSQL = "UPDATE [Path1$] SET [Path1$].[Processed]=1 WHERE [Path1$].[Processed]=0" 'This does not work - the only difference is the 'FROM [Path1$]' pi_strSQL = "UPDATE [Path1$] SET [Path1$].[Processed]=1 FROM [Path1$] WHERE [Path1$].[Processed]=0" Call adoConn.Execute(pi_strSQL) adoRS.Close Set adoRS = Nothing adoConn.Close Set adoConn = Nothing




Reply With Quote