but don't let it go unsaid that the obvious answer is to use a stored procedure interface - that guarantees that SQL injection will never occur.
Failing that, use sql statements with bind variables.
Cut it off at source, don't try to catch it once it's happened.
Regards
T