Exemple #1
0
        public int ShowTable(string TableName, out DataTable Dt_temp)
        {
            int result = 0;

            try
            {
                DataTable        Dr   = new DataTable();
                OracleConnection Conn = new OracleConnection(StrOracleCoon);
                if (Conn.State == ConnectionState.Closed)
                {
                    Conn.Open();
                }

                string            sql    = "select * from " + TableName;
                DataTable         dtFrom = new DataTable();
                OracleDataAdapter adp    = new OracleDataAdapter(sql, Conn);

                adp.Fill(dtFrom);
                Conn.Close();
                Dr.Load(new DataTableReader(dtFrom));
                Dt_temp = Dr;

                DataTableMember.CreateInstance().Dt_temp = Dr;
                return(result);
            }
            catch
            {
                Dt_temp = new DataTable();
                return(result);
            }
        }
Exemple #2
0
 public static DataTableMember CreateInstance()
 {
     if (_instance == null)
     {
         lock (lockHelper)
         {
             if (_instance == null)
             {
                 _instance = new DataTableMember();
             }
         }
     }
     return(_instance);
 }