Microsoft SQL Server Native Client 11.0 error '80040e14'

Incorrect syntax near the keyword 'AND'.

/imagedetails.asp, line 35