Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Dinky
Starting Member
37 Posts |
Posted - 2007-10-10 : 16:14:56
|
What is the best way to store 100 of thousands of .jiff files (<5 MB each) to be used (creating and retreiving) in .net c# new application using sqlserver db.We will also need to migrate existing files working with old VB application to .net c# application So the next question will be to: what is the best way to migrate these files into new db/systemPlease advice. Thanks |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-10-10 : 16:17:18
|
| It is not recommended to store the images directly in the database.Store the images on the application server. Then store the path to the images in the database. Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
Kristen
Test
22859 Posts |
|
|
Dinky
Starting Member
37 Posts |
Posted - 2007-10-10 : 16:24:47
|
| <Then store the path to the images in the database>Thanks Tara. How do we store path of files in sqlserver database. How big those entries/data field will be? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-10-10 : 16:28:49
|
| I'm not sure I understand what you are looking for when you ask how to do it. But you would use an INSERT statement and provide the location of the file. I'd probably stored partial paths and have the application server know the first part of it in say an app.config. That way you can easily move directories around and not have to update the database. Such as:On the app server, I'd store the files on a SAN drive and store the path in a config file. Perhaps F:\Images.Then in the database, I'd store:\Project1\File1.jpgSo in your application code, you'd combine the app server's config with the database data: F:\Images\Project1\File1.jpgBut that's just me. However you do it, make sure not to store the image in the database, just the path.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
|
|
|