473,397 Members | 1,950 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

parameter not valid error in vb.net2005 when retrieving image

mafaisal
142 100+
Hi Everybody

I am Using Vb.net 2005

My Error when i Retrieve imge file from sql2005 database
parameter not valid error is coming

my code is

Dim Logo As Byte() = RsC.Fields("Logo").Value
Dim stream As System.IO.MemoryStream
stream = New System.IO.MemoryStream(Logo)
PBLogo.Image = System.Drawing.Image.FromStream(stream) - Here That error coming

Also Pblogo as Picture box And in Database image stored using datatype image And it is not empty


Plz help me
Jan 15 '08 #1
0 1199

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Wally | last post by:
I am trying to display images from an Access 2000 database and I get an error "Invalid Parameter Used" when I execute the code line "picBLOB.Image = Image.FromStream(stmBLOBData)" in my Visual...
0
by: Julian | last post by:
I upgraded this program from VC6 to .NET2003 a few months back. I had to change some of the source code, but I was finally able to get it to compile and link properly. I just tried to upgrade...
4
by: escristian | last post by:
Hello. I'm trying to create an Image so I use something like this: Image newImage = Image.FromFile(filename); Now when it's a bmp file and certain .gif files it gives me an exception that...
7
by: bookon | last post by:
I was running into the System.Drawing.Image.FromStream "parameter is not valid" on some of the images I was retrieving from a blob column in Sql Server. I thought there were corrupt images as...
7
by: =?Utf-8?B?Sm9hY2hpbQ==?= | last post by:
I have an image which I'm trying to save using my_image.Save(some_path, System.Drawing.Imaging.ImageFormat.Path); and then I get the error "Parameter is not valid". What could be the reason...
2
by: =?Utf-8?B?TWFyYyBBbGxhcmQ=?= | last post by:
Hello, I have posted this message in the normal newsgroup instead of posting it in the managed ones. I have a project in VB6 (GDI+) that will read a WMF File (created by my customer) and then...
5
mafaisal
by: mafaisal | last post by:
Hi Everybody My Error when i Retrieve imge file from sql2005 database parameter not valid error is coming my code is Dim Logo As Byte() = RsC.Fields("Logo").Value Dim stream As...
2
mafaisal
by: mafaisal | last post by:
Hi Everybody I am Using Vb.net 2005 My Error when i Retrieve imge file from sql2005 database my code is Dim Logo As Byte() = RsC.Fields("Logo").Value Dim stream As System.IO.MemoryStream
6
by: SunshineInTheRain | last post by:
can anyone please help me on problem of 'Sys' is undefined error? I know a lot forum has discussed about this, but none i success to solve the error. I have run it on Window server 2000, IIS 5,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.