156 references to SqlConvert
System.Data.Common (156)
System\Data\Common\ObjectStorage.cs (2)
439retValue = SqlConvert.ChangeTypeForXML(retValue, type); 479return (string)SqlConvert.ChangeTypeForXML(value, typeof(string));
System\Data\Common\SQLConvert.cs (15)
369return (SqlConvert.ConvertToSqlBinary(value)); 371return (SqlConvert.ConvertToSqlBoolean(value)); 373return (SqlConvert.ConvertToSqlByte(value)); 375return (SqlConvert.ConvertToSqlBytes(value)); 377return (SqlConvert.ConvertToSqlChars(value)); 379return (SqlConvert.ConvertToSqlDateTime(value)); 381return (SqlConvert.ConvertToSqlDecimal(value)); 383return (SqlConvert.ConvertToSqlDouble(value)); 385return (SqlConvert.ConvertToSqlGuid(value)); 387return (SqlConvert.ConvertToSqlInt16(value)); 389return (SqlConvert.ConvertToSqlInt32(value)); 391return (SqlConvert.ConvertToSqlInt64(value)); 393return (SqlConvert.ConvertToSqlMoney(value)); 395return (SqlConvert.ConvertToSqlSingle(value)); 397return (SqlConvert.ConvertToSqlString(value));
System\Data\Common\SQLTypes\SQLBinaryStorage.cs (2)
67return SqlConvert.ConvertToSqlBinary(value); 89_values[record] = SqlConvert.ConvertToSqlBinary(value);
System\Data\Common\SQLTypes\SQlBooleanStorage.cs (2)
101return SqlConvert.ConvertToSqlBoolean(value); 123_values[record] = SqlConvert.ConvertToSqlBoolean(value);
System\Data\Common\SQLTypes\SQLByteStorage.cs (2)
176return SqlConvert.ConvertToSqlByte(value); 199_values[record] = SqlConvert.ConvertToSqlByte(value);
System\Data\Common\SQLTypes\SQLDateTimeStorage.cs (2)
103return SqlConvert.ConvertToSqlDateTime(value); 125_values[record] = SqlConvert.ConvertToSqlDateTime(value);
System\Data\Common\SQLTypes\SQLDecimalStorage.cs (2)
175return SqlConvert.ConvertToSqlDecimal(value); 197_values[record] = SqlConvert.ConvertToSqlDecimal(value);
System\Data\Common\SQLTypes\SQLDoubleStorage.cs (2)
176return SqlConvert.ConvertToSqlDouble(value); 198_values[record] = SqlConvert.ConvertToSqlDouble(value);
System\Data\Common\SQLTypes\SQLGuidStorage.cs (2)
68return SqlConvert.ConvertToSqlGuid(value); 90_values[record] = SqlConvert.ConvertToSqlGuid(value);
System\Data\Common\SQLTypes\SQLInt16Storage.cs (2)
176return SqlConvert.ConvertToSqlInt16(value); 198_values[record] = SqlConvert.ConvertToSqlInt16(value);
System\Data\Common\SQLTypes\SQLInt32Storage.cs (2)
176return SqlConvert.ConvertToSqlInt32(value); 198_values[record] = SqlConvert.ConvertToSqlInt32(value);
System\Data\Common\SQLTypes\SQLInt64Storage.cs (2)
177return SqlConvert.ConvertToSqlInt64(value); 199_values[record] = SqlConvert.ConvertToSqlInt64(value);
System\Data\Common\SQLTypes\SQLMoneyStorage.cs (2)
176return SqlConvert.ConvertToSqlMoney(value); 198_values[record] = SqlConvert.ConvertToSqlMoney(value);
System\Data\Common\SQLTypes\SQLSingleStorage.cs (2)
174return SqlConvert.ConvertToSqlSingle(value); 196_values[record] = SqlConvert.ConvertToSqlSingle(value);
System\Data\Common\SQLTypes\SQLStringStorage.cs (2)
123return SqlConvert.ConvertToSqlString(value); 151_values[record] = SqlConvert.ConvertToSqlString(value);
System\Data\DataColumn.cs (5)
528_defaultValue = SqlConvert.ConvertToSqlString(DefaultValue); 532DefaultValue = SqlConvert.ChangeTypeForDefaultValue(DefaultValue, value, FormatProvider); 657_defaultValue = SqlConvert.ChangeTypeForDefaultValue(_defaultValue, _dataType, FormatProvider); 687newDefaultValue = SqlConvert.ChangeTypeForDefaultValue(newDefaultValue, DataType, FormatProvider); 1965long v = (long)SqlConvert.ChangeType2(value, StorageType.Int64, typeof(long), CultureInfo.InvariantCulture);
System\Data\Filter\BinaryNode.cs (95)
222return SqlConvert.ConvertToSqlInt32(vLeft).CompareTo(SqlConvert.ConvertToSqlInt32(vRight)); 226return SqlConvert.ConvertToSqlInt64(vLeft).CompareTo(SqlConvert.ConvertToSqlInt64(vRight)); 229return SqlConvert.ConvertToSqlDecimal(vLeft).CompareTo(SqlConvert.ConvertToSqlDecimal(vRight)); 231return SqlConvert.ConvertToSqlDouble(vLeft).CompareTo(SqlConvert.ConvertToSqlDouble(vRight)); 233return SqlConvert.ConvertToSqlSingle(vLeft).CompareTo(SqlConvert.ConvertToSqlSingle(vRight)); 245return SqlConvert.ConvertToSqlBoolean(vLeft).CompareTo(SqlConvert.ConvertToSqlBoolean(vRight)); 250return SqlConvert.ConvertToSqlBinary(vLeft).CompareTo(SqlConvert.ConvertToSqlBinary(vRight)); 252return SqlConvert.ConvertToSqlDateTime(vLeft).CompareTo(SqlConvert.ConvertToSqlDateTime(vRight)); 254return SqlConvert.ConvertToSqlMoney(vLeft).CompareTo(SqlConvert.ConvertToSqlMoney(vRight)); 440value = (SqlConvert.ConvertToSqlInt16(vLeft) + SqlConvert.ConvertToSqlInt16(vRight)); 445value = (SqlConvert.ConvertToSqlInt32(vLeft) + SqlConvert.ConvertToSqlInt32(vRight)); 450value = (SqlConvert.ConvertToSqlInt64(vLeft) + SqlConvert.ConvertToSqlInt64(vRight)); 455value = (SqlConvert.ConvertToSqlDouble(vLeft) + SqlConvert.ConvertToSqlDouble(vRight)); 460value = (SqlConvert.ConvertToSqlSingle(vLeft) + SqlConvert.ConvertToSqlSingle(vRight)); 465value = (SqlConvert.ConvertToSqlDecimal(vLeft) + SqlConvert.ConvertToSqlDecimal(vRight)); 470value = (SqlConvert.ConvertToSqlMoney(vLeft) + SqlConvert.ConvertToSqlMoney(vRight)); 475value = (SqlConvert.ConvertToSqlByte(vLeft) + SqlConvert.ConvertToSqlByte(vRight)); 480value = (SqlConvert.ConvertToSqlString(vLeft) + SqlConvert.ConvertToSqlString(vRight)); 487SqlDateTime rValue = SqlConvert.ConvertToSqlDateTime(vRight); 488value = SqlConvert.ConvertToSqlDateTime((DateTime)rValue.Value + (TimeSpan)vLeft); 492SqlDateTime lValue = SqlConvert.ConvertToSqlDateTime(vLeft); 493value = SqlConvert.ConvertToSqlDateTime((DateTime)lValue.Value + (TimeSpan)vRight); 519value = (SqlConvert.ConvertToSqlByte(vLeft) - SqlConvert.ConvertToSqlByte(vRight)); 534value = (SqlConvert.ConvertToSqlInt16(vLeft) - SqlConvert.ConvertToSqlInt16(vRight)); 549value = (SqlConvert.ConvertToSqlInt32(vLeft) - SqlConvert.ConvertToSqlInt32(vRight)); 564value = (SqlConvert.ConvertToSqlInt64(vLeft) - SqlConvert.ConvertToSqlInt64(vRight)); 579value = (SqlConvert.ConvertToSqlDecimal(vLeft) - SqlConvert.ConvertToSqlDecimal(vRight)); 589value = (SqlConvert.ConvertToSqlSingle(vLeft) - SqlConvert.ConvertToSqlSingle(vRight)); 599value = (SqlConvert.ConvertToSqlDouble(vLeft) - SqlConvert.ConvertToSqlDouble(vRight)); 604value = (SqlConvert.ConvertToSqlMoney(vLeft) - SqlConvert.ConvertToSqlMoney(vRight)); 626SqlDateTime rValue = SqlConvert.ConvertToSqlDateTime(vRight); 627value = SqlConvert.ConvertToSqlDateTime((DateTime)rValue.Value - (TimeSpan)vLeft); 631SqlDateTime lValue = SqlConvert.ConvertToSqlDateTime(vLeft); 632value = SqlConvert.ConvertToSqlDateTime((DateTime)lValue.Value - (TimeSpan)vRight); 658value = (SqlConvert.ConvertToSqlByte(vLeft) * SqlConvert.ConvertToSqlByte(vRight)); 673value = (SqlConvert.ConvertToSqlInt16(vLeft) * SqlConvert.ConvertToSqlInt16(vRight)); 688value = (SqlConvert.ConvertToSqlInt32(vLeft) * SqlConvert.ConvertToSqlInt32(vRight)); 703value = (SqlConvert.ConvertToSqlInt64(vLeft) * SqlConvert.ConvertToSqlInt64(vRight)); 718value = (SqlConvert.ConvertToSqlDecimal(vLeft) * SqlConvert.ConvertToSqlDecimal(vRight)); 728value = (SqlConvert.ConvertToSqlSingle(vLeft) * SqlConvert.ConvertToSqlSingle(vRight)); 733value = (SqlConvert.ConvertToSqlMoney(vLeft) * SqlConvert.ConvertToSqlMoney(vRight)); 743value = (SqlConvert.ConvertToSqlDouble(vLeft) * SqlConvert.ConvertToSqlDouble(vRight)); 764value = (SqlConvert.ConvertToSqlByte(vLeft) / SqlConvert.ConvertToSqlByte(vRight)); 779value = (SqlConvert.ConvertToSqlInt16(vLeft) / SqlConvert.ConvertToSqlInt16(vRight)); 794value = (SqlConvert.ConvertToSqlInt32(vLeft) / SqlConvert.ConvertToSqlInt32(vRight)); 814value = (SqlConvert.ConvertToSqlInt64(vLeft) / SqlConvert.ConvertToSqlInt64(vRight)); 824value = (SqlConvert.ConvertToSqlDecimal(vLeft) / SqlConvert.ConvertToSqlDecimal(vRight)); 834value = (SqlConvert.ConvertToSqlSingle(vLeft) / SqlConvert.ConvertToSqlSingle(vRight)); 839value = (SqlConvert.ConvertToSqlMoney(vLeft) / SqlConvert.ConvertToSqlMoney(vRight)); 850value = (SqlConvert.ConvertToSqlDouble(vLeft) / SqlConvert.ConvertToSqlDouble(vRight)); 1050SqlInt64 res = (SqlConvert.ConvertToSqlInt64(vLeft) % SqlConvert.ConvertToSqlInt64(vRight)); 1550string rightStr = (string)SqlConvert.ChangeType2(vRight, StorageType.String, typeof(string), FormatProvider);
System\Data\Filter\DataExpression.cs (1)
144result = SqlConvert.ChangeType2(result, _storageType, _dataType!, _table!.FormatProvider);
System\Data\Filter\FunctionNode.cs (8)
494return SqlConvert.ConvertStringToDateTimeOffset((string)argumentValues[0], FormatProvider); 507return SqlConvert.ChangeType2((float)SqlConvert.ChangeType2(argumentValues[0], StorageType.Single, typeof(float), FormatProvider), mytype, type, FormatProvider); 511return SqlConvert.ChangeType2((double)SqlConvert.ChangeType2(argumentValues[0], StorageType.Double, typeof(double), FormatProvider), mytype, type, FormatProvider); 515return SqlConvert.ChangeType2((decimal)SqlConvert.ChangeType2(argumentValues[0], StorageType.Decimal, typeof(decimal), FormatProvider), mytype, type, FormatProvider); 526return SqlConvert.ChangeType2(argumentValues[0], mytype, type, FormatProvider);
System\Data\Select.cs (1)
668vRight = SqlConvert.ChangeType2(vRight, StorageType.Char, typeof(char), _table.FormatProvider);
System\Data\XDRSchema.cs (1)
486column.DefaultValue = SqlConvert.ChangeTypeForXML(strDefault, type);
System\Data\xmlsaver.cs (2)
76s = (string)SqlConvert.ChangeTypeForXML(entry.Key, typeof(string)); 85v = (string)SqlConvert.ChangeTypeForXML(entry.Value, typeof(string));