Save files on SQL 2008. Need advice

  • Thread starter Thread starter shapper
  • Start date Start date
S

shapper

Hello,

I am working on an ASP.NET MVC web site with SQL 2008.
I need to upload a files to the server.
My approach at the moment is to save the files on a folder and save
the path on a SQL table.

But I am thinking on saving the files directly on the SQL 2008
database.
I am mostly saving images and pdf's.

I know SQL 2008 has a new file type.

I am using C#. Saving the files on the database is a good approach.
How should I do this?

Thanks,
Miguel
 
shapper said:
I am working on an ASP.NET MVC web site with SQL 2008.
I need to upload a files to the server.
My approach at the moment is to save the files on a folder and save
the path on a SQL table.

But I am thinking on saving the files directly on the SQL 2008
database.
I am mostly saving images and pdf's.

I know SQL 2008 has a new file type.

I am using C#. Saving the files on the database is a good approach.
How should I do this?

I would just use IMAGE column type and plain ADO.NET (SqlCommand).

Storing the files in the database requires some power of the
database server but is easier to manage than just storing
paths in the database and content in the file system.

Arne
 
I would just use IMAGE column type and plain ADO.NET (SqlCommand).

Storing the files in the database requires some power of the
database server but is easier to manage than just storing
paths in the database and content in the file system.

Arne

I am considering using the new FileSystem of SQL 2008:
http://msdn.microsoft.com/en-us/library/cc949109.aspx

And can I insert a record using Linq getting the data from a model in
my C# code?
What would be the # data type for the file in my model that would be
placed on the FileSystem column.

Does anyone knows such an example?

I read something like this a few weeks ago but I lost the url and I
can't find it anywhere.

Thanks,
Miguel
 
shapper said:
I am considering using the new FileSystem of SQL 2008:
http://msdn.microsoft.com/en-us/library/cc949109.aspx

And can I insert a record using Linq getting the data from a model in
my C# code?
What would be the # data type for the file in my model that would be
placed on the FileSystem column.

Does anyone knows such an example?

I read something like this a few weeks ago but I lost the url and I
can't find it anywhere.

I do not know anything about the new FILESTREAM thingy.

I would not use LINQ because ORM is not good for LOB's.

I assume you will have a byte[] in C#.

Arne
 
Back
Top