[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 309
  • Last Modified:

Question about BLOB?

Hi,

I have this methode:

        private void txtbNotes_TextChanged(object sender, EventArgs e)
        {
            TreeNode node = tvNotes.SelectedNode;
            DataRow ParentRow = null;
            ParentRow = (DataRow)node.Tag;
            ParentRow["Data"] = txtbNotes.Text; <===================
        }

Instead of using the txtbNotes.Text into the column Data of a database
I want to use a blob feature. So the text of the txtbNotes have to be
converted to bytes and put it in the column Data.

I have found this on the internet:

Byte[] byteBLOBData = new Byte[0];
byteBLOBData = (Byte[])(row["DOCLIST"]);
String s = System.Text.Encoding.UTF8.GetString(byteBLOBData);

But i don't know how to implement it. Who knows the answer
and is willing to help me?

Greetings, Peter Kiers
0
peterkiers
Asked:
peterkiers
  • 2
  • 2
1 Solution
 
sabeeshCommented:
Why you want to convert into byte array and store into dattabase?. Use ntext if this one is a big string.
0
 
peterkiersAuthor Commented:
I want to try all the possibilities to store text into a database.

P.
0
 
sabeeshCommented:
What is the type of databse column you are saving this text?
0
 
peterkiersAuthor Commented:
OLeObject
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now