SBendBuckeye
Programmer
Hello All,
I am getting the following run time error when trying to use an ADO connection object Execute method.
Run-time error '-2147217900 (80040314)':
Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE',
'SELECT', or 'UPDATE'.
The initial reset SQL works with no problems:
UPDATE [TempTable] SET Included1 = True, Excluded1 = False
However, I get the above error with any of the following:
UPDATE [TempTable] _
SET Excluded1 = True WHERE [Name] LIKE "_j2a*"
UPDATE [TempTable] _
SET Excluded1 = True WHERE [Name] LIKE '_j2a*'
UPDATE [TempTable] _
SET Excluded1 = True WHERE [Name] LIKE "_j2a%"
UPDATE [TempTable] _
SET Excluded1 = True WHERE [Name] LIKE '_j2a%'
I also tried all of the above combinations with an Alias in case the sqare brackets [] around Name were the problem:
UPDATE [TempTable] AS Temp _
SET Temp.Excluded1 = True WHERE Temp.Name LIKE "_j2a*"
Any ideas or alternate suggestions out there? Thanks!
Have a great day!
j2consulting@yahoo.com
I am getting the following run time error when trying to use an ADO connection object Execute method.
Run-time error '-2147217900 (80040314)':
Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE',
'SELECT', or 'UPDATE'.
The initial reset SQL works with no problems:
UPDATE [TempTable] SET Included1 = True, Excluded1 = False
However, I get the above error with any of the following:
UPDATE [TempTable] _
SET Excluded1 = True WHERE [Name] LIKE "_j2a*"
UPDATE [TempTable] _
SET Excluded1 = True WHERE [Name] LIKE '_j2a*'
UPDATE [TempTable] _
SET Excluded1 = True WHERE [Name] LIKE "_j2a%"
UPDATE [TempTable] _
SET Excluded1 = True WHERE [Name] LIKE '_j2a%'
I also tried all of the above combinations with an Alias in case the sqare brackets [] around Name were the problem:
UPDATE [TempTable] AS Temp _
SET Temp.Excluded1 = True WHERE Temp.Name LIKE "_j2a*"
Any ideas or alternate suggestions out there? Thanks!
Have a great day!
j2consulting@yahoo.com