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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:28:55+00:00 2026-05-24T13:28:55+00:00

I am currently using Visual Studio 2008 (VB.Net) and SQL Server 2008. I have

  • 0

I am currently using Visual Studio 2008 (VB.Net) and SQL Server 2008. I have images saved on the database as image. When I fetch it into my code it is a System.Byte[] and I am unable to cast it as a System.Drawing.Image to save to my DevExpress(v10.2).XtraEditors.ImageEdit.

I have tried to

Dim imgStream As MemoryStream = New MemoryStream(image, 0, image.Length)

or

Dim imgStream As MemoryStream = New MemoryStream(image)

Yet even then I am unable to call image.FromStream(imgStream) or bitmap.FromStream(imgStream) as I get a “Parameter is not valid” when I try.

EDIT:

We are updating from a previous system that was on SQL 2000. When I run the previous program I can see the image in the program. When I run the new one any image that I migrated is an ‘invalid parameter’ yet any image I added to the database (through the input on the program) is viewable. When I fetch the image from the old database and the new one they are the exact same. Is there a difference between SQL 2000 and SQL 2008 that I should take into account when migrating the data?

  • 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-24T13:28:57+00:00Added an answer on May 24, 2026 at 1:28 pm

    Try this:

    Dim MyConverter as ImageConverter = new System.Drawing.ImageConverter()
    Dim MyImage as Image = imageConverter.ConvertFrom(byteArray)
    

    However, this error usually means that your input data is invalid. How sure are you that your byte array contains valid image data?

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

Sidebar

Related Questions

I am using VB.net within Visual Studio 2008. I currently have GridControl where one
I'm making a winform in C# using Visual Studio 2008. Currently, I have a
I have a WCF service, a MS SQL database, and the Visual Studio 2008
i am using visual studio 2008 and sql server 2008 i want to print
I'm using Visual Studio 2008 . I have created a project with asp.net Mvc
I am currently using Windows Server 2008 Standard and have several Hyper V machines.
I am using Visual C# .Net via Visual Studio 2008 Express and I am
I am developing a DLL using C# .NET 2.0 and Visual Studio 2008 Professional.
So i am using visual studio 2008, asp.net 3.5, with the basic toolkit provided.
I am currently using Visual Studio 2008 with Devexpress 10.2. My sum for some

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.