dotConnect for MySQL Documentation
Devart.Data.MySql Namespace / MySqlText Class / Value Property
Example

In This Topic
    Value Property (MySqlText)
    In This Topic
    Gets the string that is stored in the specified MySqlText object.
    Syntax
    'Declaration
     
    Public Shadows ReadOnly Property Value As String
    public new string Value {get;}

    Property Value

    The string stored in MySqlText object
    Remarks

    Use Value property to get string that is stored in a MySqlText instance. This is a read-only property, thus you can not use it to assign strings to the object. To obtain a MySqlText with another string you have to either create a new instance (recommended) or use stream methods (i.e. Read, MySqlBlob.Write).

    If you wish to treat MySqlText as a stream, you have to perform all encoding/decoding operations yourself. Read more about how to set up encoding in topic MySqlText.

    Example
    In this sample a fragment of code is shown that populates MySqlText with data from 'BlockContent' field. The data is rendered then to console.
    while (myReader.Read())
    {
      MySqlText myTextSql = myReader.GetMySqlText(myReader.GetOrdinal("BlockContent"));
      if(!myTextSql.IsNull)
      {
        Console.WriteLine(myTextSql.Value);
      }
    }
    While myReader.Read()
      Dim myTextSql As MySqlText = myReader.GetMySqlText(myReader.GetOrdinal("BlockContent"))
      If Not myTextSql.IsNull Then
        Console.WriteLine(myTextSql.Value)
      End If
    End While
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also