Author Photos

tally622

New member
Joined
Sep 24, 2007
Messages
1
Programming Experience
Beginner
Good Afternoon everyone.
I have created a database in sql 2005 that lists authors, titles, text info in the form of nuggets and hopefully author photos and book covers. I am creating an app in visual studio 2005 to allow someone to enter new info into database and search existing. I would like to store photo address in sql and use it to bring up the photo in app. I am weak in all these areas and have looked all morning for code, but all I find is streaming photo into database, which I don't want to load up. This must be simple, but I'm afraid it's beyond me. Any ideas? ps I'm using VB.net
 
the best way to do this, and the most commonly used, is to store the file path into your SQL table instead of the actual photo (the latter is known as BLOB).

i.e. You have a column called AutorPhoto

the value of Author A would be something like \\server1\authors\AuthorA.jpg - you could either store all the photos on a network share like this, or implement a folder with them all into your project.

You then drag a PictureBox to your form. You then databind Image to this column from your dataSet. Hey presto as long as the folder and pic exists, the picture is shown.
 
Back
Top