How to get size of file uploaded to SQL-Server?

Posted by MadBoy on Stack Overflow See other posts from Stack Overflow or by MadBoy
Published on 2010-03-14T10:51:54Z Indexed on 2010/03/14 10:55 UTC
Read the original article Hit count: 190

Is there a way to tell how to get a file size that is uploaded to database?

SELECT [ID]
      ,[File]
  FROM [dbo].[Reports]

I would like to be able to tell user the size of File which is VarBinary(max) field in MS SQL 2005/2008. How to do that?

Maybe the only way to do is to create another column and when inserting file i should also insert it's size in additional column?

© Stack Overflow or respective owner

Related posts about sql-server-2005

Related posts about sql-server-2008