hi,
how to retrieve(display) and save image in sql server?
thanks, 9 1690
Hi Sam,
One more.. http://www.dotnetbips.com/displayarticle.aspx?id=60
HTH
Regards
Ashish M Bhonkiya
"Sam" <a1*****@hotmail.com> wrote in message
news:ev**************@TK2MSFTNGP09.phx.gbl... hi, how to retrieve(display) and save image in sql server? thanks,
Hi,
You have read the article in MSDN "KB317034"
"Sam" <a1*****@hotmail.com> wrote in message
news:ev**************@TK2MSFTNGP09.phx.gbl... hi, how to retrieve(display) and save image in sql server? thanks,
hi guys,
could you give me a sample program (if possible in vb.net) to display
picture from sql server using image control (but i don't like to save the
image in file and then display it).
maybe you have better idea ?
thanks,
"Sam" <a1*****@hotmail.com> wrote in message
news:ev**************@TK2MSFTNGP09.phx.gbl... hi, how to retrieve(display) and save image in sql server? thanks,
Hi Sam,
If your images are dynamically generated you must take a look at the
DynamicImage user control http://msdn.microsoft.com/msdnmag/is...e/default.aspx
You may download the exe and execute the sample code within that.
HTH
Regards
Ashish M Bhonkiya
"Sam" <a1*****@hotmail.com> wrote in message
news:e8**************@TK2MSFTNGP09.phx.gbl... hi guys, could you give me a sample program (if possible in vb.net) to display picture from sql server using image control (but i don't like to save the image in file and then display it). maybe you have better idea ? thanks,
"Sam" <a1*****@hotmail.com> wrote in message news:ev**************@TK2MSFTNGP09.phx.gbl... hi, how to retrieve(display) and save image in sql server? thanks,
yes, i have read the article, and i use the the dynamicimage control, but
there is something i don't understand, please look sample code below:
private function getEmployeePhoto(empid as integer) as byte()
............' code program............
end function
private sub button1_click(..)....
dynamicImage1.imageBytes=getEmployeePhoto(3)
end sub
private sub button2_click(..)....
dynamicImage1.imageBytes=getEmployeePhoto(5)
end sub
question:
when i click button1, the image(3) is display, then i click button2, but the
image(5) doesn't show up, the image(3) still there, doesn't change to
image(5). Why ?
thanks,
"Ashish M Bhonkiya" <bh******@hotmail.com.nospam> wrote in message
news:Oz**************@TK2MSFTNGP11.phx.gbl... Hi Sam,
If your images are dynamically generated you must take a look at the DynamicImage user control http://msdn.microsoft.com/msdnmag/is...e/default.aspx
You may download the exe and execute the sample code within that.
HTH Regards Ashish M Bhonkiya
"Sam" <a1*****@hotmail.com> wrote in message news:e8**************@TK2MSFTNGP09.phx.gbl... hi guys, could you give me a sample program (if possible in vb.net) to display picture from sql server using image control (but i don't like to save
the image in file and then display it). maybe you have better idea ? thanks,
"Sam" <a1*****@hotmail.com> wrote in message news:ev**************@TK2MSFTNGP09.phx.gbl... hi, how to retrieve(display) and save image in sql server? thanks,
Hi Sam,
Can you post the complete code in which you are facing this problem ??
Regards
Ashish M Bhonkiya
"Sam" <a1*****@hotmail.com> wrote in message
news:uh****************@tk2msftngp13.phx.gbl... yes, i have read the article, and i use the the dynamicimage control, but there is something i don't understand, please look sample code below:
private function getEmployeePhoto(empid as integer) as byte() ...........' code program............ end function
private sub button1_click(..).... dynamicImage1.imageBytes=getEmployeePhoto(3) end sub
private sub button2_click(..).... dynamicImage1.imageBytes=getEmployeePhoto(5) end sub
question: when i click button1, the image(3) is display, then i click button2, but
the image(5) doesn't show up, the image(3) still there, doesn't change to image(5). Why ?
thanks,
"Ashish M Bhonkiya" <bh******@hotmail.com.nospam> wrote in message news:Oz**************@TK2MSFTNGP11.phx.gbl... Hi Sam,
If your images are dynamically generated you must take a look at the DynamicImage user control http://msdn.microsoft.com/msdnmag/is...e/default.aspx
You may download the exe and execute the sample code within that.
HTH Regards Ashish M Bhonkiya
"Sam" <a1*****@hotmail.com> wrote in message news:e8**************@TK2MSFTNGP09.phx.gbl... hi guys, could you give me a sample program (if possible in vb.net) to display picture from sql server using image control (but i don't like to save the image in file and then display it). maybe you have better idea ? thanks,
"Sam" <a1*****@hotmail.com> wrote in message news:ev**************@TK2MSFTNGP09.phx.gbl... > hi, > how to retrieve(display) and save image in sql server? > thanks, > > >
preliminary:
1.modify web.config accrding to the article
2. add reference to dynamicimage.dll
the code:
Private Sub GetCustomer(ByVal eid As Integer)
Dim cn As New SqlConnection(strcn)
cn.Open()
Dim cm As New SqlCommand("select * from employees where employeeid = " &
eid, cn)
cm.CommandType = CommandType.Text
Dim rd As SqlDataReader = cm.ExecuteReader(CommandBehavior.CloseConnection)
If rd.Read Then
If Not IsDBNull(rd("photo")) Then
Dim img As Byte() = CType(rd("photo"), Byte())
Dim ms As New MemoryStream(img, 78, img.Length - 78)
DynamicImage1.ImageBytes = ms.ToArray()
End If
End If
rd.Close()
cm.Dispose()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
GetCustomer(1)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
GetCustomer(2)
End Sub
questions:
1. when i click button1, the image from customer with id = 1, display in the
web, then i click button2, but image of customer with id = 2 doesn't appear
.. why ?
2. how to use openfiledialog in asp.net ?
thanks,
"Ashish M Bhonkiya" <bh******@hotmail.com.nospam> wrote in message
news:uy**************@TK2MSFTNGP09.phx.gbl... Hi Sam, Can you post the complete code in which you are facing this problem ??
Regards Ashish M Bhonkiya
"Sam" <a1*****@hotmail.com> wrote in message news:uh****************@tk2msftngp13.phx.gbl... yes, i have read the article, and i use the the dynamicimage control,
but there is something i don't understand, please look sample code below:
private function getEmployeePhoto(empid as integer) as byte() ...........' code program............ end function
private sub button1_click(..).... dynamicImage1.imageBytes=getEmployeePhoto(3) end sub
private sub button2_click(..).... dynamicImage1.imageBytes=getEmployeePhoto(5) end sub
question: when i click button1, the image(3) is display, then i click button2, but the image(5) doesn't show up, the image(3) still there, doesn't change to image(5). Why ?
thanks,
"Ashish M Bhonkiya" <bh******@hotmail.com.nospam> wrote in message news:Oz**************@TK2MSFTNGP11.phx.gbl... Hi Sam,
If your images are dynamically generated you must take a look at the DynamicImage user control http://msdn.microsoft.com/msdnmag/is...e/default.aspx You may download the exe and execute the sample code within that.
HTH Regards Ashish M Bhonkiya
"Sam" <a1*****@hotmail.com> wrote in message news:e8**************@TK2MSFTNGP09.phx.gbl... > hi guys, > could you give me a sample program (if possible in vb.net) to
display > picture from sql server using image control (but i don't like to
save the > image in file and then display it). > maybe you have better idea ? > thanks, > > "Sam" <a1*****@hotmail.com> wrote in message > news:ev**************@TK2MSFTNGP09.phx.gbl... > > hi, > > how to retrieve(display) and save image in sql server? > > thanks, > > > > > > > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: dave |
last post by:
Hello there,
I am at my wit's end ! I have used the following script succesfully to
upload an image to my web space. But what I really want to be able to do is
to update an existing record in a...
|
by: Tjerk |
last post by:
Hello all,
I have the script below to change an image depending on the date upto
january it worked fine but then it just stopped working does anybody have an
idea how I can make it work again or...
|
by: Jef Driesen |
last post by:
I'm implementing some image processing algorithms in C++. I created a
class called 'image' (see declaration below), that will take care of the
memory allocations and some basic (mathematical)...
|
by: QuasiChameleon |
last post by:
Hi,
I'm trying to create a grayscale image class that reads and writes
grayscale Targa format. This works well with smaller images, but
corrupts larger images and creates a "Segmentation fault...
|
by: Anand Ganesh |
last post by:
HI All,
I have an Image. I want to clip a portion of it and copy to another image.
How to do this? I know the bounding rectangle to clip.
Any suggestions please.
Thanks for your time and...
|
by: Kristof Thys |
last post by:
Hello,
I'm writing a ASP.net webservice wich will visualize an image, generated
by another application.
The generated image is a char*. I can transform this to a String*, but I
want to view it...
|
by: lgbjr |
last post by:
Hello All,
I¡¯m using a context menu associated with some pictureboxes to provide
copy/paste functionality. Copying the image to the clipboard was easy. But
pasting an image from the clipboard...
|
by: David Lozzi |
last post by:
Howdy,
I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders!
Now I am making a public function that will take the...
|
by: bharathv6 |
last post by:
i need to do is modify the image in memory like resizing the image in memory etc ... with out saving it disk as i have to return back the image with out saving it disk
PIL supports the use of...
|
by: Debadatta Mishra |
last post by:
Introduction
In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
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....
|
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...
| |