protected override string BuildValue(QConst value) { object constValue = value.Value; // special processing for arrays if (constValue is IList) { return(BuildValue((IList)constValue)); } if (constValue is DateTime) { // Date values should be enclosed within pound signs (#). (MSDN) return("#" + constValue.ToString() + "#"); } if (constValue is string) { return("'" + constValue.ToString().Replace("'", "''") + "'"); } if (constValue == DBNull.Value) { return("NULL"); } return(constValue.ToString()); }
protected override string BuildValue(QConst value) { object constValue = value.Value; // special processing for arrays if (constValue is IList) { return(BuildValue((IList)constValue)); } return(BuildCommandParameter(constValue)); }
protected virtual string BuildValue(QConst value) { object constValue = value.Value; // special processing for arrays if (constValue is IList) { return(BuildValue((IList)constValue)); } if (constValue is string) { return(BuildValue((string)constValue)); } return(Convert.ToString(constValue, System.Globalization.CultureInfo.InvariantCulture)); }