Click here to Skip to main content
15,908,901 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everyone.

i just have a small question.

i have a large group of images. and i want to store it in database. i mean for ex:- i have 1000 wallpapers and i want to save it to sql database to use it in my vb.net program .. this is at first.


i don't want to create program to save images .. No!!


what i want is create image database i already have the his picture .
that's all what i want

please help . Thanks for all
Posted
Updated 5-Aug-11 16:47pm
v4
Comments
Herman<T>.Instance 5-Aug-11 23:52pm    
which sql server do you use? 2005 or 2008?
SamiZF 6-Aug-11 9:39am    
sql 2008, and i just want to make images database, i mean no needed
to (insert into , update). just save multi Count of wallpapers to database in Binary maybe? that's it .

Hi,

Here you will find a starting point to solve your problem:
http://www.beansoftware.com/ASP.NET-Tutorials/Save-Read-Image-Database.aspx[^]

Look at the source code at the end of the article.

What I found at MSDN about the image datatype is this:
http://msdn.microsoft.com/en-us/library/ms187993.aspx[^]

There you will see that the image datatype will be disconinued in future versions of MS-SQL. Microsoft recommends that you use a varbinary(max) for future projects (http://msdn.microsoft.com/en-us/library/ms188362.aspx[^]).

Hope this helps.

Best regards and happy coding,
Chris
 
Share this answer
 
If you have 1000 wallpapers then to be honest the best, quickest, most accurate way is going to be to cretae a quick program to do it. The alternatives are going to be very labour intensive - a program is just a case of "this folder: load all .JPG files". It's not difficult to do (hell, it's a sub twenty line console app if necessary!) Where as gettingthe images into a DB manually is probably more time to do per 20 images image than it is to write test and ready-to-run the whole app!
 
Share this answer
 
With all respect to OriginalGriff's proposal, i doubt that to write such application will take 20 lines of code. Thus, if you are familiar a bit with C# you can try this CP source code with demo project C# - dataCollector – Collecting and Saving Data Easily.
I hope, it will be fun to learn something from useful example.
 
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