Hello everyone: I have the following helper method to format sql string parameters:
public static string DoQuotes(string sqlParam) { if (sqlParam.IndexOf("'") > 0) { sqlParam = sqlParam.Replace("'","''"); } return "'" + sqlParam + "'"; } Is there a better way, performance-wise? thanks, Greg You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.