public DefaultConstraint(SQLiteConnectionStringBuilder SQLConnSetting, int DefaultConstraint_ID, DefaultConstraints owner) { _Owner = owner; SQLConnSet.ConnectionString = SQLConnSetting.ConnectionString; using (SQLiteConnection Conn = new SQLiteConnection(SQLConnSet.ConnectionString)) { Conn.Open(); using (SQLiteCommand Com = Conn.CreateCommand()) { Com.CommandTimeout = 10; Com.CommandText = "SELECT name, object_id, principal_id, schema_id, parent_object_id, type, type_desc, create_date, modify_date, is_ms_shipped, is_published, is_schema_published, parent_column_id, definition, is_system_named FROM sys.default_constraints WHERE DefaultConstraint_id=" + DefaultConstraint_ID + " ORDER BY DefaultConstraint_id"; SQLiteDataReader rs = Com.ExecuteReader(); while (rs.Read()) { AddFromRecordSet(rs); } rs.Close(); Conn.Close(); rs.Dispose(); } } }
public DefaultConstraint(SQLiteConnectionStringBuilder SQLConnSetting, SQLiteDataReader rs, DefaultConstraints owner) { _Owner = owner; SQLConnSet.ConnectionString = SQLConnSetting.ConnectionString; AddFromRecordSet(rs); }