473,320 Members | 2,098 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,320 software developers and data experts.

Image to SqlServer in C#

I had a look and couldn't find what I was after under google, so I'll ask
here.

I want to know how to take an image from a Picture Box (how the image gets
there is irrelevant) and save it in a SQL table. I have found example for
doing it from a file stream in VB.Net, but not a picturebox and I don't have
the knowledge of C# objects to know which ones to use for this task.
If this fails, I will try saving the image, then using a filestream to read
it back in in order to use the example I have found, but that is double
handling and I would prefer not to have to save the image to disk.
Nov 15 '05 #1
1 1323
Hi,

You could save it to a memory stream instead of a FileStream, but I think
that using a stream to save it to is the only solution
--
Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Adam Goetz" <ad********@ayrdata.com> wrote in message
news:uC**************@TK2MSFTNGP11.phx.gbl...
I had a look and couldn't find what I was after under google, so I'll ask
here.

I want to know how to take an image from a Picture Box (how the image gets
there is irrelevant) and save it in a SQL table. I have found example for
doing it from a file stream in VB.Net, but not a picturebox and I don't have the knowledge of C# objects to know which ones to use for this task.
If this fails, I will try saving the image, then using a filestream to read it back in in order to use the example I have found, but that is double
handling and I would prefer not to have to save the image to disk.

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Gary B | last post by:
I'm converting a windows application to a web application. (by the way, this is way easier than it used to be - many of the modules went over untouched!) The windows app used a pictuebox and...
9
by: EricJ | last post by:
hi all the situation there is a picbox w a drawing, if the user clicks somewhere on the drawing a cross is added where he clicked (the cross is a pic in a new picture box), he can add as many...
0
by: Ron | last post by:
Hi there My company is developing a web based document archival and retrieval system, using ASP.NET, c# and sqlserver 2000. This development is in testing at present and all looks promising. ...
2
by: satish | last post by:
hi, i have inserted the image present in mydocuments using alter command create table aa(a int, d image) insert into aa values (1,'F:\prudhvi\baba 002.jpg') when i do select * from aa i...
3
by: Dave Keen | last post by:
Hi all. Hope you can help me. This should be easy but I can't make this work. In brief I am building a page of thumbnails using images held in a SQLServer 2000 database. I do this by creating...
2
by: Ed | last post by:
Hope someone can help me out... I have been tasked to read some image data from an sql database and save the files to flat files. OK, sounds easy as I'v used BLOBs before. But this is an old...
0
by: Saaima | last post by:
Hi All when I store a picture of size 800*600 pixels in database (SqlServer) field Photo (Image) and load it into crystal report through query by dragging and dropping the field on report it...
0
by: medriis | last post by:
i saved picture in sqlserver image filed.now i want to retrieve record by passing picture in query where clause??????????????????????????? can somebody tell how it will happened.?????????????????
2
by: fraser.jc | last post by:
We have a table in our SQL2005 db with a varbinary(max) column in it. In this field we store images and pdfs that the user has uploaded in our .net 2.0 web app. I'm attempting to get the images out...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.