Question about BLOB?

Posted on 2011-05-05
Last Modified: 2013-12-16

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
Question by:peterkiers
    LVL 8

    Expert Comment

    Why you want to convert into byte array and store into dattabase?. Use ntext if this one is a big string.
    LVL 1

    Author Comment

    I want to try all the possibilities to store text into a database.

    LVL 8

    Accepted Solution

    What is the type of databse column you are saving this text?
    LVL 1

    Author Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Suggested Solutions

    A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
    Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now