? ""Nobuya Higuchi"" <[EMAIL PROTECTED]> ?? ??? ??
news:[EMAIL PROTECTED]
> Hi,
>
> I'm trying to read a single-byte in FB2.0 database as char(1) field with
>...
> DataTable dt = new DataTable();
> dt.Columns.Add("dtd", typeof (byte)); // "dtd" is the name of the
> database
> field
> ..
> Try this
>
> DataTable dt = new DataTable();
> dt.Columns.Add("dtd", System.Type.GetType("System.Byte")); // "dtd" is
> the
> name of the database field
>
> K.
Result:
It produces the same error as in case of
dt.Columns.Add("dtd", typeof(byte));
System.ArgumentException : <(the byte conten
> Try to add column as object not as byte. Probably there's some
> casting. The look what's inside object (it'll be probably char). When
> you will know this, do casting to byte just before filling datatable.
>
> --
> Jiri {x2} Cincura
I don't understand whay you are saying. How can I cast the ad
? ""Nobuya Higuchi"" <[EMAIL PROTECTED]> ?? ??? ??
news:[EMAIL PROTECTED]
>> Try this
>>
>> DataTable dt = new DataTable();
>> dt.Columns.Add("dtd", System.Type.GetType("System.Byte")); // "dtd" is
>> the
>> name of the database field
>>
>> K.
>
> Result:
>
> It produces the same error
> DataTable dt = new DataTable();
> dt.Columns.Add("dtd"); // "dtd" is the name of the database field
>
> then read the value into string and convert with
>
> byte val=byte.Parse(inputstring);
I'm sorry but this is exactly where it started.
with the single-byte value being '\xA0'
byte.Parse(inp
Angel Ivorra wrote:
>
>
> then i add this line to the machine.config file
>
> type="System.Data.Common.DbProviderConfigurationHandler, System.Data,
> Version=2.0.1.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c" />
>
> in the section
>
>
Change version 2.0.1.0 to 2.1.0.0
--
View