Hello,
I need to implement image on ultrapictureBox. this image is store on SQL SERVER 2005.
This a part of my code :
UltraPictureBox1.Image = ObjetDataSet2.Tables("dt_artiimage").Columns(3)
Can you help me ?
thanks
Laurent
This all depends on how you're storing the image on the server. You will likely have to convert the value into a .NET Image before you can assign it to the UltraPictureBox, though I can't suggest how that can be done from your code.
-Matt
HI Matt,
First of all, thanks for your answer.I store pictures on sql server with "image" type.
I can't tell you more about that. There no more information about that in my database.
Is it possible to you, to tell me how convert picture from slq server in .net ?
thk
Laurent (France)
A stream is not an image. You have to convert your stream into an Image type in DotNet. You might try Image.FromStream and see if that works. If not, you will need to consult Microsoft documentation on how to get an Image in DotNet from an Image field in SQL Server.
Hi,
I have try this code. There no error message, but the image do not appear (a red cross).
'Ouverture de l'image
Dim WshShell As ObjectDim dirBureau As String
WshShell = CreateObject("WScript.Shell")dirBureau = WshShell.SpecialFolders("Desktop")
UltraPictureBox1.Image = mstream
Help ! ;-)