I decided to share this information on the web as I’ve visited many sources where the workaround for the conversation failed sql error is not entirely accurate.
If you receive this ASP error, it’s probably due to the fact that you are trying to return a list of results where the declared variable in your if statement = a certain interger value. Depending on who designed the table structure and relations in a SQL database, you cannot declare this statement if your data contains symbol(s) such as a comma (which was used to relate your record with other records).
To resolve this issue, simply use the SQL LIKE clause as well as including percentages %variablename% around the variable in cases where the identifier is greater than 2 digits in length (i.e. id=1,3,12,15,233). Now when you execute the sql statement, whatever value is in your variablename (example 15), only records will display that contain the number 15 (exactly 2 digits long). The commas used to seperate your related ID’s will be ignored in this case..