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 7029671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:34:10+00:00 2026-05-28T00:34:10+00:00

i want to save a byte[] in a table of SQLite Database (Field datatype

  • 0

i want to save a byte[] in a table of SQLite Database (Field datatype is BLOB).

In that array i want to save a negative Double value say -36524.063415093093 in byte format (Not in byte[] format)

Double b = -36524.063415093093;

//  Signature is 
//  byte[] arr = new Byte[] {Double, byte, byte, byte};

When i write Convert.ToByte(b) it gives error & if i write (byte)b it returns 84.

but how to i convert 84 back to -36524.063415093093?

Please correct if my approach is wrong?

  • 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-28T00:34:11+00:00Added an answer on May 28, 2026 at 12:34 am

    Please correct if my approach is wrong?

    Your approach is wrong 😉

    You cannot store a double (which requires 64 bits) into a single byte (which is only 8 bits). It’s impossible

    You can get a byte array, which is just all the 64 bits spread across 8 bytes. This would let you store your double in a byte array. But you indicate that you don’t want that.

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

Sidebar

Related Questions

I have a byte array that I want to save it as a bitmap
I want to save content of a RichTextBox to varbinary (= byte array) in
I want to save my canvas into MySQL database (BLOB cell). I have function
How can I save a byte[] array into a SQL Server database? This byte[]
i want to save a balance of user, in the user table . the
I want to save large amounts of text then display them (first in table
i have a table that have one column (AbsoluteUrl NVARCHAR(2048)) and i want to
I encrypt a string in c# (RijndaelManaged), which returns a byte array. I want
I want to save space when writing my data to file. That is I
I want to save an object (of any type) into a field in a

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.