SqlString Structure
TOC
Collapse the table of content
Expand the table of content

SqlString Structure

 

Represents a variable-length stream of characters to be stored in or retrieved from the database. SqlString has a different underlying data structure from its corresponding .NET Framework String data type.

Namespace:   System.Data.SqlTypes
Assembly:  System.Data (in System.Data.dll)

[SerializableAttribute]
public struct SqlString : INullable, IComparable, IXmlSerializable

NameDescription
System_CAPS_pubmethodSqlString(Int32, SqlCompareOptions, Byte[])

Initializes a new instance of the SqlString structure using the specified locale id, compare options, and data.

System_CAPS_pubmethodSqlString(Int32, SqlCompareOptions, Byte[], Boolean)

Initializes a new instance of the SqlString class.

System_CAPS_pubmethodSqlString(Int32, SqlCompareOptions, Byte[], Int32, Int32)

Initializes a new instance of the SqlString class.

System_CAPS_pubmethodSqlString(Int32, SqlCompareOptions, Byte[], Int32, Int32, Boolean)

Initializes a new instance of the SqlString class.

System_CAPS_pubmethodSqlString(String)

Initializes a new instance of the SqlString structure using the specified string.

System_CAPS_pubmethodSqlString(String, Int32)

Initializes a new instance of the SqlString structure using the specified string and locale id values.

System_CAPS_pubmethodSqlString(String, Int32, SqlCompareOptions)

Initializes a new instance of the SqlString structure using the specified string, locale id, and compare option values.

NameDescription
System_CAPS_pubpropertyCompareInfo

Gets the CompareInfo object that defines how string comparisons should be performed for this SqlString structure.

System_CAPS_pubpropertyCultureInfo

Gets the CultureInfo structure that represents information about the culture of this SqlString object.

System_CAPS_pubpropertyIsNull

Indicates whether this SqlString structure is null.

System_CAPS_pubpropertyLCID

Specifies the geographical locale and language for the SqlString structure.

System_CAPS_pubpropertySqlCompareOptions

A combination of one or more of the SqlCompareOptions enumeration values that represent the way in which this SqlString should be compared to other SqlString structures.

System_CAPS_pubpropertyValue

Gets the string that is stored in this SqlString structure. This property is read-only.

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticAdd(SqlString, SqlString)

Concatenates two specified SqlString values to create a new SqlString structure.

System_CAPS_pubmethodClone()

Creates a copy of this SqlString object.

System_CAPS_pubmethodSystem_CAPS_staticCompareOptionsFromSqlCompareOptions(SqlCompareOptions)

Gets the CompareOptions enumeration equilvalent of the specified SqlCompareOptions value.

System_CAPS_pubmethodCompareTo(Object)

Compares this SqlString object to the supplied Object and returns an indication of their relative values.

System_CAPS_pubmethodCompareTo(SqlString)

Compares this SqlString instance to the supplied SqlString and returns an indication of their relative values.

System_CAPS_pubmethodSystem_CAPS_staticConcat(SqlString, SqlString)

Concatenates the two specified SqlString structures.

System_CAPS_pubmethodEquals(Object)

Compares the supplied object parameter to the Value property of the SqlString object.(Overrides ValueType.Equals(Object).)

System_CAPS_pubmethodSystem_CAPS_staticEquals(SqlString, SqlString)

Performs a logical comparison of the two SqlString operands to determine whether they are equal.

System_CAPS_pubmethodGetHashCode()

Gets the hash code for this instance.(Overrides ValueType.GetHashCode().)

System_CAPS_pubmethodGetNonUnicodeBytes()

Gets an array of bytes, that contains the contents of the SqlString in ANSI format.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodGetUnicodeBytes()

Gets an array of bytes, that contains the contents of the SqlString in Unicode format.

System_CAPS_pubmethodSystem_CAPS_staticGetXsdType(XmlSchemaSet)

Returns the XML Schema definition language (XSD) of the specified XmlSchemaSet.

System_CAPS_pubmethodSystem_CAPS_staticGreaterThan(SqlString, SqlString)

Performs a logical comparison of the two SqlString operands to determine whether the first is greater than the second.

System_CAPS_pubmethodSystem_CAPS_staticGreaterThanOrEqual(SqlString, SqlString)

Performs a logical comparison of the two SqlString operands to determine whether the first is greater than or equal to the second.

System_CAPS_pubmethodSystem_CAPS_staticLessThan(SqlString, SqlString)

Performs a logical comparison of the two SqlString operands to determine whether the first is less than the second.

System_CAPS_pubmethodSystem_CAPS_staticLessThanOrEqual(SqlString, SqlString)

Performs a logical comparison of the two SqlString operands to determine whether the first is less than or equal to the second.

System_CAPS_pubmethodSystem_CAPS_staticNotEquals(SqlString, SqlString)

Performs a logical comparison of the two SqlString operands to determine whether they are not equal.

System_CAPS_pubmethodToSqlBoolean()

Converts this SqlString structure to SqlBoolean.

System_CAPS_pubmethodToSqlByte()

Converts this SqlString structure to SqlByte.

System_CAPS_pubmethodToSqlDateTime()

Converts this SqlString structure to SqlDateTime.

System_CAPS_pubmethodToSqlDecimal()

Converts this SqlString structure to SqlDecimal.

System_CAPS_pubmethodToSqlDouble()

Converts this SqlString structure to SqlDouble.

System_CAPS_pubmethodToSqlGuid()

Converts this SqlString structure to SqlGuid.

System_CAPS_pubmethodToSqlInt16()

Converts this SqlString structure to SqlInt16.

System_CAPS_pubmethodToSqlInt32()

Converts this SqlString structure to SqlInt32.

System_CAPS_pubmethodToSqlInt64()

Converts this SqlString structure to SqlInt64.

System_CAPS_pubmethodToSqlMoney()

Converts this SqlString structure to SqlMoney.

System_CAPS_pubmethodToSqlSingle()

Converts this SqlString structure to SqlSingle.

System_CAPS_pubmethodToString()

Converts a SqlString object to a String.(Overrides ValueType.ToString().)

NameDescription
System_CAPS_pubfieldSystem_CAPS_staticBinarySort

Specifies that sorts should be based on a characters numeric value instead of its alphabetical value.

System_CAPS_pubfieldSystem_CAPS_staticBinarySort2

Specifies that sorts should be based on a character's numeric value instead of its alphabetical value.

System_CAPS_pubfieldSystem_CAPS_staticIgnoreCase

Specifies that SqlString comparisons should ignore case.

System_CAPS_pubfieldSystem_CAPS_staticIgnoreKanaType

Specifies that the string comparison must ignore the Kana type.

System_CAPS_pubfieldSystem_CAPS_staticIgnoreNonSpace

Specifies that the string comparison must ignore non-space combining characters, such as diacritics.

System_CAPS_pubfieldSystem_CAPS_staticIgnoreWidth

Specifies that the string comparison must ignore the character width.

System_CAPS_pubfieldSystem_CAPS_staticNull

Represents a DBNull that can be assigned to this instance of the SqlString structure.

NameDescription
System_CAPS_puboperatorSystem_CAPS_staticAddition(SqlString, SqlString)

Concatenates the two specified SqlString structures.

System_CAPS_puboperatorSystem_CAPS_staticEquality(SqlString, SqlString)

Performs a logical comparison of the two SqlString operands to determine whether they are equal.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(SqlBoolean to SqlString)

Converts the specified SqlBoolean structure to SqlString.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(SqlByte to SqlString)

Converts the specified SqlByte structure to SqlString.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(SqlDateTime to SqlString)

Converts the specified SqlDateTime parameter to SqlString.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(SqlDecimal to SqlString)

Converts the specified SqlDecimal parameter to SqlString.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(SqlDouble to SqlString)

Converts the specified SqlDouble parameter to SqlString.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(SqlGuid to SqlString)

Converts the specified SqlGuid parameter to SqlString.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(SqlInt16 to SqlString)

Converts the specified SqlInt16 parameter to SqlString.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(SqlInt32 to SqlString)

Converts the specified SqlInt32 parameter to SqlString.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(SqlInt64 to SqlString)

Converts the specified SqlInt64 parameter to SqlString.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(SqlMoney to SqlString)

Converts the specified SqlMoney parameter to SqlString.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(SqlSingle to SqlString)

Converts the specified SqlSingle parameter to SqlString.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(SqlString to String)

Converts a SqlString to a String

System_CAPS_puboperatorSystem_CAPS_staticGreaterThan(SqlString, SqlString)

Performs a logical comparison of the two SqlString operands to determine whether the first is greater than the second.

System_CAPS_puboperatorSystem_CAPS_staticGreaterThanOrEqual(SqlString, SqlString)

Performs a logical comparison of the two SqlString operands to determine whether the first is greater than or equal to the second.

System_CAPS_puboperatorSystem_CAPS_staticImplicit(String to SqlString)

Converts the String parameter to a SqlString.

System_CAPS_puboperatorSystem_CAPS_staticInequality(SqlString, SqlString)

Performs a logical comparison of the two SqlString operands to determine whether they are not equal.

System_CAPS_puboperatorSystem_CAPS_staticLessThan(SqlString, SqlString)

Performs a logical comparison of the two SqlString operands to determine whether the first is less than the second.

System_CAPS_puboperatorSystem_CAPS_staticLessThanOrEqual(SqlString, SqlString)

Performs a logical comparison of the two SqlString operands to determine whether the first is less than or equal to the second.

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIXmlSerializable.GetSchema()

This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIXmlSerializable.ReadXml(XmlReader)

This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIXmlSerializable.WriteXml(XmlWriter)

This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

String always uses the default CultureInfo from the current thread, but SqlString contains its own locale Id and compare flags. The comparison result of two SqlString structures is independent of operating system and current thread locale.

When you use SqlString comparison operators, note that if the LCIDs of arguments are different, comparison functions throw an exception because they cannot be compared. For example, the statement

SqlString mySqlString = new SqlString("abc");

is equivalent to

SqlString mySqlString = new SqlString("abc", CultureInfo.CurrentCulture.LCID);

Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft