public SQL_Type(SQLiteConnectionStringBuilder SQLConnSetting, byte system_type_id, SQL_Types 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, system_type_id, user_type_id, schema_id, principal_id, max_length, precision, scale, collation_name, is_nullable, is_user_defined, is_assembly_type, default_object_id, rule_object_id from sys.types where system_type_id=" + system_type_id + ""; SQLiteDataReader rs = Com.ExecuteReader(); while (rs.Read()) { AddFromRecordSet(rs); } rs.Close(); Conn.Close(); rs.Dispose(); } } }
public SQL_Type(SQLiteConnectionStringBuilder SQLConnSetting, SQLiteDataReader rs, SQL_Types owner) { _Owner = owner; SQLConnSet.ConnectionString = SQLConnSetting.ConnectionString; AddFromRecordSet(rs); }