I assume that you want to store a BLOB in the SQL Server database table and the length you are referring to is the length of the BLOB. Use the FileInfo
class as in the following example.
using System.IO;
FileInfo fi = new FileInfo(somepath);
int len = fi.Length;
If you are instead referring to the duration (time length) of the video file see here how to do just that.
Microsoft.DirectX.AudioVideoPlayback.Video video = new Microsoft.DirectX.AudioVideoPlayback.Video(path);
StringBuilder sb = new StringBuilder();
sb.Append(video.Caption);
sb.Append("\r\n");
sb.Append(video.Size.Width.ToString());
sb.Append( "\r\n");
sb.Append(video.Size.Height.ToString());
sb.Append("\r\n");
sb.Append(video.Duration.ToString());
textBox1.Text = sb.ToString();