Ok, having got over the irritation of SQL throwing an error when the search string passed to FREETEXT contains only noise words, I want to be able to handle that error so that my application does not receive it.
I tried:
But the error is still returned to the app (a ColdFusion web page).
Do I have to handle this error application side or is there a way to handle it from the database?
Thanks in advance
DT
I tried:
Code:
...
BEGIN TRANSACTION
SELECT * FROM myTable
INNER JOIN FREETEXTTABLE(myTable,*,@searchString) as ftTable
ON myTable.[key] = ftTable.[key]
ORDER BY ftTable.RANK
SET @error = @@error
IF @error != 0
BEGIN
ROLLBACK TRANSACTION
RETURN 0
END
...
But the error is still returned to the app (a ColdFusion web page).
Do I have to handle this error application side or is there a way to handle it from the database?
Thanks in advance
DT