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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T23:53:30+00:00 2026-06-11T23:53:30+00:00

I am developing an asp.net 3.5 website , I need to store some screensaver

  • 0

I am developing an asp.net 3.5 website , I need to store some screensaver files .scr on the host machine , I wonder if there is a way to store .scr or .exe files in sqlserver database and retreive them ? any helps whould be appriciated .

  • 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-06-11T23:53:32+00:00Added an answer on June 11, 2026 at 11:53 pm

    Store them as BLOB (Binary Large Object) and store the file stream, which basically is a byte array. Normally the file is stored on a server and the database only holds the file path and name. You will have to make space for a BLOB data type in your database in SQL server will allow images of 8000 bytes:
    BLOBData varBinary(8000)

    // Using DataTable as a mockup database.
    System.Data.DataTable table = new System.Data.DataTable();
    table.Columns.Add("file name");
    table.Columns.Add("data");
    
    // Read data from file.
    byte[] stream = System.IO.File.ReadAllBytes("th.exe");
    // Add the file to the db, don't know how you add data to your database.
    table.Rows.Add("th.exe", stream);
    // Create a filestream that will write data to disk (in a file).
    System.IO.FileStream save = new System.IO.FileStream((string)table.Rows[0].ItemArray[0], System.IO.FileMode.Create);
    // Retrieve the data from the database, don't know how you do this with your database.
    byte[] data = (byte[])table.Rows[0].ItemArray[0];
    // Write data to the file on disk.
    save.Write(data, 0, data.Length);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a website in asp.net using dotnetnuke cms. I need to add
I'm developing an website using asp.net mvc with MySQL and I need to make
I need to debug the website i 'm developing (ASP.NET MVC3, Razor, .NET 4,
I am developing a asp.net website and need to add validator for multiple textboxes.
I am developing a website using Asp.Net MVC framework. We need to add general
I'm developing a website in asp.net and now I need to convert it to
I am developing an asp.net website that will need regular updates for source codes
I'm developing an ASP.NET website that will need to support non-flash users. In case
I'm developing some Asp.Net website and I'm trying to run it on my IIS,
I'm developing a asp.net webforms website using vb.net. In that list of files displayed

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.