Click to See Complete Forum and Search --> : Save Photo


Blue Sky
March 17th, 2001, 10:00 PM
I'm now writing a programe for the administrative staff to enter all staff members personal information through serval local terminals and the information will be stored in the remote SQL Server. My programme also needs to handle photos of the staff members

I have the following questions to ask :
1) Where should I store the photo ?
I've thought about storing those photos in each local computer. Whenever the
admin. staff needs to input staff members information, he only needs to press
a button(links with common dialog box) which will displays the
directory/file screen for the staff to choose the corresponding filename of
the photo. But I think it is impossible to store all photos in each local
computer.

2) How can I store the photos in the SQL Server? Use what kinds of methods ?

3) How can I retrieve the images from the remote SQL Server?

I hope my questions won't be too long !!!
If you know how to do, please teach me.
Thank you!!!

Cakkie
March 18th, 2001, 06:39 AM
SQL server has a datatype Image. This can be used to store any type of data, but is expecially used to store binary data (including pictures).
To add data to the image field, you must open the file for binary input, read a part of it, and add it to the field using the appendchunk method of the recordset object.
To retrieve data, you can use the getchunk method of the recordset.

Tom Cannaerts
slisse@planetinternet.be

The best way to escape a problem, is to solve it.