Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4270838
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T07:21:38+00:00 2026-05-21T07:21:38+00:00

I am having my data saved in my database as Longblob and while saving

  • 0

I am having my data saved in my database as Longblob and while saving i am converting it to bytes and saving now while retrieving we can have that data by writing as follows

 Byte[] bytes = (Byte[])dt.Rows[0]["Data"];
                    Response.BinaryWrite(bytes);

But what i need is i need that data in bytes to be represented as string is it possible

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T07:21:39+00:00Added an answer on May 21, 2026 at 7:21 am

    Well, is the data an encoded string? If so, use something like

    string text = Encoding.UTF8.GetString(bytes);
    

    … but make sure you use the right encoding.

    If it’s arbitrary binary data though, you should use base64 instead:

    string text = Convert.ToBase64String(bytes);
    

    That will get you an entirely-ASCII string which can be converted back to the original byte array using Convert.FromBase64String.

    Without knowing what your data is, it’s impossible to say which of these approaches is appropriate. You say you’re converting your data to bytes when you save – but you haven’t said how you’ve converted your data to bytes. Basically you want to reverse that process, whatever it is.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a database that has decompiled data versions of PDF files stored as
I am having huge lines data which could accomdate in Textbox. While I am
I am having problems manually looping through xml data that is received via an
I am having problems connecting to a Sqlite database through System.Data.Sqlite. I was trying
How can you go about updating a record without having to select the data
I'm having trouble saving a new row in the DataGridView back to the database.
I am having an issue that I can't seem to figure out. Hopefully somebody
I'm having a hard time saving my template to a database and download the
I'm having a strange problem saving data with cakePHP. I'll explain as I go.
Having issues with screen progress. I have a screen displaying information from a database.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.