how to store image path in database
i want to store image path (eg: c:\myproject\myphoto\0001.jpg) to my database
and show it in picture box
store in my db like this
ID: 001
photo: 001.jpg (rename photo file name to ID + .jpg)
ID:002
photo: 002.jpg
anone have and toturial or example ?
thanks again
ekkapop
Re: how to store image path in database
Do you mean you actually want to save the image itself, as opposed to file path?
Re: how to store image path in database
If you want just the paths, then build your strings, insert them into the database and rename your files. It should be fairly straight forward with System.IO.
Re: how to store image path in database
i mean to
1. copy image file into myapplication path/photo/
2. file name is equal to ID
3. resize image : )
can you give me an example or toturials ?
Re: how to store image path in database
For 1 and 2 look at the IO.File namespace. It has a Move procedure which you can use to move and rename.
example
VB Code:
IO.File.Move("c:\myPic.jpg", Application.StrartupPath & "/Images/001.jpg")
And check this out for resizing the image