Occasionally (Or frequently during initial setup), unexpected errors can happen while getting a database connection, or your sql statement may have a typo in it, or there might be a odbc problem in itself. Maybe the impersonated user name is misspelled. In such cases, if you have choosen such errors to be logged (configured in Log Settings Panel), then you can view the error in the log file. Meanwhile, your website visitors will be denied access and they may think their userid and password is not valid. Therefore, it may be beneficial for certain type of errors to redirect the user to a different, unprotected web page and explain them that there is a system problem.
Potential problems of this kind are:
Database connection problems: if your database server is down, or if the ODBC DSN is not setup correctly this kind of problem may surface. Usually, once the setup is done correctly, as long as the database server is available, this error should not happen.
Invalid SQL query: If you have a typo in your SQL statement, executing it will cause an error. Usually this kind of error will be detected at setup time and once it works, it will continue to work.
ODBC environment errors: Sometimes ODBC components may have misconfigurations that cause the filter to fail to initialize it. This is extremely rare also and should not happen. But if it happens, by redirecting your users to an error page, you may want to let users know problem is on your side, not theirs.
Impersonate User Failed: The user you have specified to be used for impersonation during database access may not be a valid user on your Windows NT domain. This kind of error is also easily caught at initial setup and testing time.