private int GetRecordsForAGroupFromXref(int groupID, string tbleName) { int count = -1; // string sql = ""; string whereClause = GroupQB.GROUP_ID_COL_XREFTBL + " = " + groupID; try { DbInfo = new DatabaseWrapper(Lcf); DbInfo.Connect(); count = DbInfo.GetCount(tbleName, whereClause); if (count == -1) { Logger.LogError(5, "Error getting count from table " + tbleName + " Where " + whereClause); } } catch (Exception ex) { Logger.LogError(5, "Error getting count of xref entires for a group with ID = " + groupID + " from table" + tbleName + "' at :" + ex); count = -1; } finally { if (DbInfo != null) { DbInfo.Disconnect(); } } return(count); }