O'Reilly logo

ADO.NET in a Nutshell by Bill Hamilton, Matthew MacDonald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

SqlString

Synopsis

A structure that represents a variable-length stream of characters. You can use this structure for the following SQL Server data types: char, nchar, varchar, nvarchar, ntext, text, and sysname. You can configure how SqlString instances should be compared by setting a combination of values from the SqlCompareOptions enumeration for the SqlCompareOptions property.

The built-in methods include one for string concatenation (Concat( )). To determine the geographical locale and language for this structure, use the LCID property, and for information about culture-specific settings (such as culture name, writing system, and calendar) use the CultureInfo property.

public struct SqlString : INullable, IComparable {

// Public Constructors

   public SqlString(int lcid, SqlCompareOptions compareOptions, byte[  ] data);

   public SqlString(int lcid, SqlCompareOptions compareOptions, byte[  ] data, bool fUnicode);

   public SqlString(int lcid, SqlCompareOptions compareOptions, byte[  ] data, int index, int count);

   public SqlString(int lcid, SqlCompareOptions compareOptions, byte[  ] data, int index, int count, bool fUnicode);

   public SqlString(string data);  

   public SqlString(string data, int lcid);  

   public SqlString(string data, int lcid, SqlCompareOptions compareOptions);

// Public Static Fields

   public static readonly int BinarySort;                      // =32768

   public static readonly int IgnoreCase;                      // =1

   public static readonly int IgnoreKanaType;                  // =8

   public static readonly int IgnoreNonSpace;                  // =2 public ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required