Ejemplo n.º 1
0
        public static List <string> ObtainListPrimaryKey(DATA.CONNECTOR.IDataConnector connector, string TableName)
        {
            string sql = "SELECT Col.Column_Name FROM     INFORMATION_SCHEMA.TABLE_CONSTRAINTS Tab,     INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE Col ";

            sql += " WHERE Col.Constraint_Name = Tab.Constraint_Name    AND Col.Table_Name = Tab.Table_Name    AND Constraint_Type = 'PRIMARY KEY'    AND Col.Table_Name = '" + TableName + "'";

            System.Data.DataTable retPrimKey = connector.Query(sql, null);
            List <string>         retour     = new List <string>();

            foreach (System.Data.DataRow item in retPrimKey.Rows)
            {
                string primaryJey = Convert.ToString(item[0]);
                if (!string.IsNullOrWhiteSpace(primaryJey))
                {
                    retour.Add(primaryJey);
                }
            }
            return(retour);
        }
Ejemplo n.º 2
0
 public DataPOProviderSQL(DATA.CONNECTOR.IDataConnector connector) : base(connector)
 {
 }
Ejemplo n.º 3
0
 public DataPoSampleProviderNK(DATA.CONNECTOR.IDataConnector connector) : base(connector)
 {
 }