public dbTSFLibrary getTSFLibraryByNameSpace(String libraryNameSpace) { dbTSFLibrary lb = null; String sql = "SELECT * FROM " + dbTSFLibrary._TABLE_NAME + " WHERE " + dbTSFLibrary._TARGET_NAMESPACE + " = ?"; OleDbParameter[] dbParams = { CreateParameter(dbTSFLibrary._ID, libraryNameSpace) }; OleDbDataReader reader = ExecuteSqlQuery(sql, dbParams); if (reader != null) { bool reading = reader.Read(); if (reading) { lb = new dbTSFLibrary(); while (reading) { lb.load(reader); lb.Signals = getTSFLibrarySignals(lb.id); reading = reader.Read(); } } reader.Close(); reader.Dispose(); } return(lb); }
public List <dbTSFLibrary> getTSFLibraries() { List <dbTSFLibrary> list = new List <dbTSFLibrary>(); String sql = "SELECT * FROM " + dbTSFLibrary._TABLE_NAME; OleDbParameter[] dbParams = {}; OleDbDataReader reader = ExecuteSqlQuery(sql, dbParams); if (reader != null) { while (reader.Read()) { dbTSFLibrary lb = new dbTSFLibrary(); lb.load(reader); list.Add(lb); } reader.Close(); reader.Dispose(); } return(list); }
public dbTSFLibrary getTSFLibrary(Guid libraryUUID) { dbTSFLibrary lb = new dbTSFLibrary(); String sql = "SELECT * FROM " + dbTSFLibrary._TABLE_NAME + " WHERE " + dbTSFLibrary._ID + " = ?"; OleDbParameter[] dbParams = { CreateParameter(dbTSFLibrary._ID, libraryUUID) }; OleDbDataReader reader = ExecuteSqlQuery(sql, dbParams); if (reader != null) { while (reader.Read()) { lb.load(reader); lb.Signals = getTSFLibrarySignals(libraryUUID); } reader.Close(); reader.Dispose(); } return(lb); }