Error!!!

Error! The following error has occured. The tech support team has been notified and will address the problem soon. Please try again later.

Error Executing Database Query. [Macromedia][SQLServer JDBC Driver][SQLServer]Incorrect syntax near the keyword 'and'.
The error occurred on line 167.