Exemplo n.º 1
0
 private void DoLoadConstraints()
 {
     if (_helper != null && constraints.Count == 0 && !_isLoadConstraints)
     {
         string    sql = "select a.constraint_name,a.table_name,a.column_name,b.constraint_type,b.status,b.index_name from user_cons_columns a,user_constraints b where a.table_name=b.table_name and a.constraint_name=b.constraint_name and a.position=1 and a.table_name='" + table_name + "'";
         DataTable dt  = _helper.ExecuteDataTable(sql);
         foreach (DataRow item in dt.Rows)
         {
             OracleTableConstraintsClass otcc = new OracleTableConstraintsClass(item);
             constraints.Add(otcc);
         }
         _isLoadConstraints = true;
     }
 }
Exemplo n.º 2
0
 private void DoLoadConstraints()
 {
     if (_helper != null && constraints.Count == 0 && !_isLoadConstraints)
     {
         string sql = "select a.constraint_name,a.table_name,a.column_name,b.constraint_type,b.status,b.index_name from user_cons_columns a,user_constraints b where a.table_name=b.table_name and a.constraint_name=b.constraint_name and a.position=1 and a.table_name='" + table_name + "'";
         DataTable dt = _helper.ExecuteDataTable(sql);
         foreach (DataRow item in dt.Rows)
         {
             OracleTableConstraintsClass otcc = new OracleTableConstraintsClass(item);
             constraints.Add(otcc);
         }
         _isLoadConstraints = true;
     }
 }