Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > .NET Framework 1.x
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
.NET Framework 1.x For discussing versions 1.0 and 1.1 of the Microsoft .NET Framework.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 1.x section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old September 18th, 2008, 03:56 AM
Authorized User
 
Join Date: Dec 2006
Location: Accra, , Ghana.
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default Retrieve and Display Image

How do i retrieve and display an Image in a picturebox from SQL Server Database.

I tried using the code below.
I got the error "Cast from type 'Byte() to type 'String' is not valid"

code:

Try
  Connect()
  jesacon.Open()
  jesacmd = New SqlCommand("SELECT PER_SIGN FROM PER_INFO_SIGN WHERE PER_NAME = '" & CheqOwnerComboBox.SelectedItem.ToString & "'", jesacon)

jesadr = jesacmd.ExecuteReader

While jesadr.Read

    DisplaySignPictureBox.Image.FromFile(jesadr(0))

End While

Catch ex As Exception
    MsgBox(ex.Message)
End Try


I just can't understand how to get this work.

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload image-create & save thumbnail-display image angshujit ASP.NET 2.0 Professional 6 July 11th, 2013 10:34 PM
How to insert and retrieve image? hlchuah77 SQL Server 2000 3 February 13th, 2005 10:41 AM
retrieve and display selected results babywind BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 0 February 11th, 2005 04:23 AM
Qry to retrieve from 2 tables and display tsimsha Classic ASP Databases 3 October 29th, 2004 02:03 AM
Retrieve and display data without tbl messed up lxu Access 0 March 21st, 2004 10:30 AM



All times are GMT -4. The time now is 07:47 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.