473,626 Members | 3,439 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sql Server 2005 Image Storage and Retreival

1 New Member
Hi,

I have a problem in the Image storing and retrieving at SQL Server 2005, my code is:

-----------------------------------------------------------------------------

for storing:

Image tempImg;

tempImg = (Image) picPhotograph.I mage;


tempImg.Save(me mBuffer, System.Drawing. Imaging.ImageFo rmat.Bmp);

bfrBuffer = new byte[memBuffer.Lengt h];

memBuffer.Read( bfrBuffer, 0, (int)memBuffer. Length);

----------------------------------------------------------------------------

I am sending bfrBuffer using stored procedure to SQL server 2005, by when executing for storage, getting error as "Operand type clash: image is incompatible with varchar", I am using DBtype.binary (I can't able use SqlDbtype.Image , because my framework don't support) to assign bfrBuffer in the stored procedure parameter, I think here is the problem.

----------------------------------------------------------------------------

for retriving:

Image tempImg;

memBuffer.Write (bytEmployee, 0, bytEmployee.Len gth);

tempImg = Image.FromStrea m(memBuffer);

picPhotograph.I mage = tempImg;

--------------------------------------------------------------------------

Here I am getting "parameter not valid" in the "tempImg = Image.FromStrea m(memBuffer);".

Can anybody help me.

Regards,

Nelson.
Sep 7 '06 #1
0 3286

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

Similar topics

9
4845
by: Michael Walton | last post by:
I need some help, because I am utterly confused with how to do this. I have 2 things that I need to figure out, and could use some sample code or just some general direction: 1) I need to build an admin page that allows me to browse to the file that I want stored in SQL Server 2000 in an image field, have it uploaded to the server, and then stored in the db. I see this done all the time, so I don't think this part is too hard, but I'm...
4
1887
by: Kums | last post by:
Step 1: Write suspend for database. Connect to database. Issue the following command: db2 set write suspend for database Step 2: Create True Image Create a True Image of the required NAS Volumes. Step 3: Write resume for database.
7
6312
by: gemel | last post by:
I am developing an application that uses SQL 2000 as my source of images. I have successfully created the code to load the images onto the SQL Server and also to retrieve the images into a dataset. I tested the application by populating a Dataset with the images from SQL Server and rendered just one of the images by using a bitmap and inserting the resulting stream into the response stream as a Jpeg format. My next move was to bind this...
23
6790
by: barryfz | last post by:
I need to be able to move from one web app on my server to another on the same server and preserve the session state. I have played with server.transfer but I get an error saying I can't do this. How can I accomplish this. I don't think redirects with session state being passed in the url makes any sense from a security standpoint. -- Barry
1
1148
by: ks | last post by:
HI is it possible to preload images to client browser directly from sql server without storing them on server space Have a nice day thanks in advance ks.
2
5316
by: Connie | last post by:
We have a blob in one table that is storing pdf files. I need to write a select query that will grab that column and write those *.pdf files out to a location on my hard drive. Does anyone know how that can be done? All suggestions would be greatly appreciated....
0
12884
Coldfire
by: Coldfire | last post by:
Since i cannot show the differences in a two-column like table. I am first putting MS SQL Server 2005 and then MySQL 5.x. MS SQL Server 2005 Brief Overview - SQL Server is a full-fledged database system developed specifically for large enterprise databases. All advanced features of a relational database are fully implemented. - Once you purchase the product, you are only limited to the Sybase-derived engine.
2
4951
by: samadams_2006 | last post by:
Hello, I have a problem that I'm hoping someone will be able to help me resolve. 1) I have a C# Web Site in which I connect to the database: "Install Microsoft SQL Server 2005 Express Edition" via the link on: http://msdn2.microsoft.com/en-us/express/bb410792.aspx
6
1785
by: LordZyse | last post by:
Just so everyone can know, I would LOVE to stay with yellowtip webserver, if you know how to install the GD files to it PLEASE let me know. This php worked on my 4.x php server but I get unexpected end with any other. Needless to say I only upgraded to 5.2 because Yellowtip web server 2.0's php did not come with the GD librarys which I needed to upload pics using mini file host. If you can fix ethier problem I would be so greatful
0
8268
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8202
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8641
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6125
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5575
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4202
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2628
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1812
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1512
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.