Use ADO.NET Parameter objects. These will also take care of the case where the user enters a double-quote, a semi-colon, a double-dash, and other invalid characters.
Another benefit is that it protects you from SQL Injection, which is an attack where the bad guy can send arbitrary SQL commands to your database.
Chip H.
____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first