//Метод выдает список индексов данной таблицы или сообщает о том, есть ли в ней данный индекс public bool RunOverIndexList(string dbFile, string table, string index = "") { try { string indexesS = ""; bool fieldFinded = false; using (var db = new DaoDb(dbFile)) { db.ConnectDao(); foreach (Index ind in db.Database.TableDefs[table].Indexes) { indexesS += ind.Name + "\n"; if (ind.Name == index) { fieldFinded = true; } } } if (index == "") { MessageBox.Show(indexesS); } else { return(fieldFinded); } return(false); } catch (Exception) { return(false); } }
//Открывает рекордсет, при закрытии база данных не будет закрыта public DaoRec(DaoDb daodb, string stSql, object type = null, object options = null, object lockEdit = null) { _useDb = true; DaoDb = daodb.ConnectDao(); Open(daodb.Database, stSql, type, options, lockEdit); }