We are currently on SQL 2005 at work and I am migrating an old Foxpro system to new web application backed by SQL Server. I am using TRY CATCH in T-SQL for transaction proce
TRY ... CATCH
will fail to catch an error if you pass a "bad" search term to CONTAINSTABLE
For example:
DECLARE @WordList VARCHAR(800)
SET @WordList = 'crap"s'
CON
TAINSTABLE(table, *, @WordList)
The CONTAINSTABLE
will give you a "syntax error", and any surrounding TRY ... CATCH
does not catch this.
This is particularly nasty because the error is caused by data, not by a "real" syntax error in your code.