Click here to Skip to main content
15,910,981 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have multiple directories in my application which contains images. I want to store the image names of all the images into database. Any help will be appreciated. Thanks.

My direcotry names are in a pattern like below :

dir1 ----- contains images
dir2 ----- contains images
dir3 ----- contains images
dir4 ----- contains images
dir5 ----- contains images
.
.
.
.
dir99 ----- contains images
Posted
Comments
OriginalGriff 15-Mar-15 3:07am    
And?
What have you tried?
Where are you stuck?
Harpreet_125 15-Mar-15 3:13am    
Actually sir i dont have any idea.. :(

1 solution

"Actually sir i dont have any idea.. :( "

So... You start from the beginning.
We don't do your homework, so it's going to be up to you to do this yourself.
But we'll help guide you through.

Start by looking at the task and breaking it into two parts:
1) Data collection
2) Data storage

The first part is relatively trivial:
You need to find all the folders - Directory.GetDirectories may help - and then find the files - Directory.GetFiles this time.

The second is harder, because it involves taking to your DB.
Start by thinking about how you normally INSERT to aDB and it from there.

Give it a try, and let me know how far you get.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900