Storing Images with ADO.NET Controls

Using Drag Drop or Binding Source, how to store Images?

Page 1 of 1

1 Replies - 2154 Views - Last Post: 04 June 2008 - 09:01 AM Rate Topic: -----

#1 jagatworld   User is offline

  • New D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 31
  • Joined: 11-May 08

Storing Images with ADO.NET Controls

Posted 04 June 2008 - 04:44 AM

Hi all,

I need some help for the following senario:

I have a database in SQL Express :

CNO - Candidate Number - integer
Name - Candidate Name - varchar(50)
DOB - Date of Birth - Datetime
Photo - Candidate Image - image

Now, i have created a connection and a new data source.
On draging and dropping a table from datasources, (detailed view)

we have the following in the form:
  • dataset
  • table adapter
  • bindingsource
  • bindinginsource navigator
  • Binded Controls
  • Textbox
  • Textbox
  • DatetimePicker
  • Picturebox
on the form

Now when we run the form, we can create new records, edit existing, or delete any. (without the image datatype)

But when there is an image datatype,
how to handle it?

how can i upload a new photo to this image box when creating new record?
how to edit this picture column and other things.

Please help me in this situation.


This post has been edited by jagatworld: 04 June 2008 - 04:54 AM

Is This A Good Question/Topic? 0
  • +

Replies To: Storing Images with ADO.NET Controls

#2 Jayman   User is offline

  • Student of Life
  • member icon

Reputation: 421
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: Storing Images with ADO.NET Controls

Posted 04 June 2008 - 09:01 AM

You would be better off storing the images in a folder and then simply storing the path to the image in the database. This is by far the most effective solution to your issue.

But if you really want to store the image in the database, then you can find a tutorial here.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1