Code:
string SQL = "SELECT FileName,FileSize,ContentType,FileData FROM FileTable WHERE FileID = '" + FileID + "'"; SqlConnection con = Connection.GetConnection(); SqlCommand cmd = new SqlCommand(); DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter(SQL, con); cmd.CommandType = CommandType.Text; cmd.Connection = con;