关于类和方法
在helper()类里有一个Ycxt()查询的方法,在别的页面调用这个方法,怎么判断是否查询到数据
数据库是oracle
helper()类
public void Ycxt(string ex) { OracleConnection conn = new OracleConnection(ConnectionString); string sql = "select * from table_journal where xinxi='"+ ex.ToString().Trim() +"'"; OracleDataAdapter da = new OracleDataAdapter(sql,conn); DataSet ds = new DataSet(); da.Fill(ds); }
try { } catch (Exception ex) { helper log = new helper(); log.Ycxt(ex.ToString());//这里怎样判断是否查询到了数据 }