Привязка считывает двоичные данные (текст в поле blob-объекта)
Я использую WindowsForm с C# и Visual Studio 16.8.1
Can you read a Blob field (MySql db) via Binding ? I find it possible to do so with Binary (BLOB) fields containing Images, via "Image" and Varchar with "Text", but with Bynary (BLOB) containing text ?
Что я уже пробовал:
suppose the Blob contains the text test text on blob field
//read Blob field from a DataTable with DataRow NoteF = (byte[])(row["tag"]); //read Byte NoteImgPrec += Encoding.UTF8.GetString(NoteF).Trim(); //with DataSet and Binding source //ImageDataSet is a PictureBox //tbFile is a TextBox //PictureBox from Blob field - image is visible ImageDataSet.DataBindings.Add(new Binding("Image", bs, "immagine", true)); //Textbox from Text field - text is visible tbFile.DataBindings.Add(new Binding("Text", bs, "namefile", true)); //Blob field from Blob field //is possible to assign //with Binding type for ???? tbNote.DataBindings.Add(new Binding("????" , bs, "tag", false));
//if I use tbNote.DataBindings.Add(new Binding("Text" , bs, "tag", false)); //the result is Byte[] Array