Anyone know how this can be done within SQL 2008? I want each row to point to a different image using a relative path. Not to sure what data type to use and how the relative path should be formated. Any help would be appreciated.
I assume this is then linked into an application? If so do you mean saving the images to a folder within your application folder?
i.e. C:\My Project\Images - where C:\My Project is where your application installs to?
Yeah, I'm using VB to build this application. I'm not to sure where to put the image. Would it be best to throw them into the VB project folder and create an image folder within that folder? In SQL when I use a path to this image would I include the C:\? or just images/image.jpg?
I would include them in your project's output folder (like I mentioned above) and then use a picturebox to display the necessary pictures.
I've done something before where I've had a picturebox that has something like
.image = "C:\My Project\Images\" & me.txtName.text & ".jpg"
As long as an image exists in that folder with a name matching the txtName field then the picture will be displayed (you will need to refresh the code when browsing more than one row)
In theory you therefore don't need a column in SQL to say where the picture is. Instead you put the pictures in the folder and match to a variable on your row. Even ID (1.jpg, 2.jpg etc)
That may not be exactly what you are looking for, but may help
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.