|
Subject:
|
Images to Database
|
|
Posted By:
|
Eyob_the_pro
|
Post Date:
|
1/1/2007 2:19:47 AM
|
I wish to have a piece of code that help me save pictures of employees of a company and see them some other time. Database used is SQL Server 2000.
|
|
Reply By:
|
ahmad_diab85
|
Reply Date:
|
1/10/2007 6:07:47 AM
|
helllo... 1-u gonna but all picture u used in same folder. 2-u are going to save the path of the image . 3-then u will put image box and open the image depending on the path
ahmad diab,,,,,,
|
|
Reply By:
|
dparsons
|
Reply Date:
|
1/10/2007 12:43:53 PM
|
Depends on what you want to do. Are you trying to store a Byte Representation of an image in SQL or are you just wanting to store the path of the image in the database?
The latter of the 2 is trivial since you would just be inserting a varchar value of [path/to/image]
The former requires that you load the image into memory from a users HD, convert that image into a Byte Stream and then pass that byte stream into SQL (Column Type image) Using GDI you will be able to reassamble and view the image when pulling it from a database.
------------------------- I will only tell you how to do it, not do it for you. Unless, of course, you want to hire me to do work for you.
^^Thats my signature
|
|
Reply By:
|
Imar
|
Reply Date:
|
1/10/2007 12:52:31 PM
|
Take a look at this article for an implementation of both ideas:
http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=414
Imar --------------------------------------- Imar Spaanjaars Everyone is unique, except for me.
|