Added a message box to notify the user when an RO cannot be found. This is used when you do a Go To RO in PROMS.

Added a NULL reference check.
This commit is contained in:
2015-07-30 17:13:08 +00:00
parent 28a3a99c50
commit 0e255bc3d8
2 changed files with 18 additions and 3 deletions

View File

@@ -1666,7 +1666,9 @@ namespace RODBInterface
DBE.ReaderClose();
// if this is a group, see if children.
if (retele.Name == "vlnGroup")
// if the DBE.Read() cannot find the RO, then retele remains a NULL
// the null check was added to prevent a null reference error
if (retele != null && retele.Name == "vlnGroup")
{
string strGetSubCount = "SELECT COUNT (RecID) as cnt FROM " + tbl + " WHERE ";
strGetSubCount = strGetSubCount + "ParentID='" + recid + "'";