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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T11:19:54+00:00 2026-06-02T11:19:54+00:00

I saved image in sql server database.Now I am getting image from sql server

  • 0

I saved image in sql server database.Now I am getting image from sql server database, by the following code but my image is showing in image control.But in this code i am saving this image in project directory. I want this image without saving, direct from my sql server database
What should i change in code.

    Dim result As Image = Nothing
    Dim da As SqlDataAdapter = New SqlDataAdapter("select * from infoimage", con)
    Dim dt As DataTable = New DataTable("TABLE")
    da.Fill(dt)
    result = Image.FromStream(New MemoryStream(DirectCast(dt.Rows(0)(0), Byte())))
    result.Save("C:\Documents and Settings\Administrator\Desktop\GridViewExport   \img.jpg")
    Image1.ImageUrl = "~/img.jpg"

Please help me

  • 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-02T11:19:55+00:00Added an answer on June 2, 2026 at 11:19 am

    Ouuh, you should not paste image like this.
    First, Image object itself is already an image, not a url.
    So, once you’ve got an image from string, you should return it in response.write().
    But better solution would be image handler.
    Here is example.

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

Sidebar

Related Questions

How can I save and retrieve an image from a SQL Server database in
My image is passed into my program from a server and saved as a
Following code is to save image took from camera into photo album. if ([mediaType
I'm retrieving HTML of many webpages (saved earlier) from SQL Server. My purpose is
I have a script that pulls an image from SQL Server and displays it
I want to know a proper way of saving image path to SQL server
Question In SQL Server 2005, I have a table with images (data type: image).
I'm doing module to save and retrieve images using SQL server database 2008 and
This afternoon I was reviewing the security for a user in my SQL Server,
I'm trying to store images in a sql server database. I've got a column

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.