Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
| Search | Today's Posts | Mark Forums Read
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old October 9th, 2004, 01:20 AM
Registered User
Join Date: Oct 2004
Location: delhi, delhi, India.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default ADO.NET(Retrieve image from databse)

i want to retrieive the photo of employees stored in table employees
of Northeind database.
I have 4 buttons(First,Next,Previous,Last) and one PictureBox on the
Coding of the Last button is as follows:

Dim bm As BindingManagerBase
     bm = Me.BindingContext(DsEmployees1, "employees")
     bm.Position = bm.Count - 1
     Dim c As Integer = DsEmployees1.Tables("employees").Rows.Count
Dim ctr As Integer = DsEmployees1.Tables(0).Rows.Count - 1

Dim bytEmpPhoto() As Byte =

DsEmployees1.Tables("employees").Rows(ctr)("Photo" )
     Dim stmEmpPhoto As New MemoryStream(bytEmpPhoto)
     PictureBox1.Image = Image.FromStream(stmEmpPhoto)

This coding gives me an error:
'System.ArgumentException' occured.
Error: Invalid Parameter Used.

  #2 (permalink)  
Old October 9th, 2004, 10:17 AM
Friend of Wrox
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts

You have posted in the Feedback Forum. This topic would be more appropriate in one of the programming forums, in this case probably an ADO forum.


-Snib <><
Try new FreshView 0.2!
There are only two stupid questions: the one you don't ask, and the one you ask more than once ;)

Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieve and Display Image asters .NET Framework 1.x 0 September 18th, 2008 03:56 AM
Retrieve image data from mysql db vermaarun2005 PHP Databases 0 July 14th, 2007 11:12 AM
How to store image in oracle database and retrieve y.suresh JSP Basics 1 February 28th, 2005 07:01 AM
How to insert and retrieve image? hlchuah77 SQL Server 2000 3 February 13th, 2005 11:41 AM
How to Retrieve Table Names using ADO ramk_1978 ADO.NET 1 October 22nd, 2004 08:19 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.