: Saving Image Path in SQL server I want to know a proper way of saving image path to SQL server when working with ASP.net. I'm using SQL server 2005 & VB 2008.
I want to know a proper way of saving image path to SQL server when working with ASP.net.
I'm using SQL server 2005 & VB 2008.
More posts by @Merenda212
1 Comments
Sorted by latest first Latest Oldest Best
Once you've uploaded it will be somewhere in your webroot most likely (unless you specify otherwise)
What I've done in the past for this type of thing (using PHP though) is rename the file to something that will be unique if they're all going into the same directory (like add the timestamp to the image name at the beginning.
Then once you have that name, write only it to your DB as a varchar datatype.
When you need to call it, you should know the path where your upload script is storing the files, so you would just concat the name stored in the DB to the "img_root_path" or whatever you want to call your path to the files.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.