JoneLee

Hi all,

I see that

The DataType property supports the following base .NET Framework data types:

as well as the following array type:

  • Byte[]

but I can't see tataType Byte[] in the dataTable --> datacoulmn -->click property -->DataType. (I use Dataset, .xsd, to define the dataTable)

if I want to use the byte[] as the column datatype, how should I do it

Preappreciate for any idea and suggetion!

Jone



Re: Windows Forms Data Controls and Databinding how to set dataType of dataTable column as byte[]

Gavin Jin - MSFT

HiŁ¬Jone

In my IDE,I can find the "System.Byte" in the property panel of the column.Please check the datatype in the properties panel of the column.I think you will find it.

Regards.






Re: Windows Forms Data Controls and Databinding how to set dataType of dataTable column as byte[]

JoneLee

Yes, i can also find the System.Byte in the property panel of the column. But since I want to get the varbinary data (encrypted password) from the database table, the Byte is not enough, right I need Byte[] to store the varbinary data. What I do't know is how to set the dataTable coulmn datatype so that I can get the varbinary data out from database table, then I can handle the decryption.(since my app may run against sql2000, so I can't use column encryption and decryption).

I tried to use System.Byte as the dataType, but when I read the data from it, error occured.

Inconvertible type mismatch between SourceColumn 'EncryptedPassword' of Byte[] and the DataColumn 'EncryptedPassword' of Byte.

I might have missed something.

If you know something about it, please give ame a help!

Thanks a lot,

Jone





Re: Windows Forms Data Controls and Databinding how to set dataType of dataTable column as byte[]

Gavin Jin - MSFT

Yes ,it not list System.Byte[] . But you can add "[ ]"after "System.Byte" manually, it goes well here. Hope it helps.






Re: Windows Forms Data Controls and Databinding how to set dataType of dataTable column as byte[]

JoneLee

Thanks, Gavin. This really helps.