1 protected DataSet GetData()
2 {
3
4 //Oracle.DataAccess.Client.OracleConnection conn = new Oracle.DataAccess.Client.OracleConnection(connstr);
5 System.Data.OracleClient.OracleConnection conn = new OracleConnection(connstr);
6 try
7 {
8 conn.Open();
9 //Oracle.DataAccess.Client.OracleCommand com = conn.CreateCommand();
10 OracleCommand com = conn.CreateCommand();
11 com.CommandText = "select * from DL_GOVT_NOTICE_INFO";//"select * from DL_GOVT_NOTICE_EXP_HIST";
12 //Oracle.DataAccess.Client.OracleDataAdapter apter = new Oracle.DataAccess.Client.OracleDataAdapter(com);
13 OracleDataAdapter apter = new OracleDataAdapter(com);
14 DataSet ds = new DataSet();
15 apter.Fill(ds);
16 apter.Dispose();
17 conn.Dispose();
18 return ds;
19 }
20 catch (Exception ex)
21 {
22 this.LabShowInfo.Text = "Error: " + ex.Message;
23 conn.Close();
24 return null;
25 }
26
27 }