On 05/09/14 12:34, Mark Rotteveel wrote:
> A quick workaround is to use:
>
> string text = reader["LONG_TEXT"] as string;
>
> This will perform the cast, but return null if the cast failed.
That's perfect, thanks. Knew I was missing something simple.
Scott
On Fri, 05 Sep 2014 12:08:33 +0100, Scott Morgan
wrote:
> Am I missing a trick here? I'm reading from a BLOB SUB_TYPE 1 column
> using the following:
>
> FbDataReader reader = /* blah */
> string text = (string)reader["LONG_TEXT"];
>
> It's okay when there is data, but if the column happens to b
Am I missing a trick here? I'm reading from a BLOB SUB_TYPE 1 column
using the following:
FbDataReader reader = /* blah */
string text = (string)reader["LONG_TEXT"];
It's okay when there is data, but if the column happens to be NULL I get
an error ("Unable to cast object of type 'System.DBNull' t