Category : SQL Advanced

To use this function you need to give your server user sys.spOACreate permissions.   Code: — ============================================= — Author: Bruno Figueiredo — Description: Returns the file information — ============================================= CREATE FUNCTION fn_getfiledetails ( @Filename sysname ) /* How to use: select * from fn_getfiledetails(‘c:\file.ext’) */ RETURNS @filedetails TABLE ( [Path] VARCHAR(100), [ShortPath] VARCHAR(100), [Type] VARCHAR(100), ..

Read more