DataSet fileNameDs = DbHelper.excuteSqlResultDataSet(strSql); if (fileNameDs != null && fileNameDs.Tables.Count > 0) { DataTable fileNameDt = fileNameDs.Tables[0]; if (fileNameDt != null && fileNameDt.Rows.Count > 0) { return fileNameDt.Rows[0][0].ToString(); } }