BOReader what am I missing

I should add catID comes in as a function argument from EpiViewNotification and my messagebox with the whereClause comes back correct "CodeTypeID='MEMOSHCD' AND LongDesc='OCRREV'"

--- In vantage@yahoogroups.com, "jgiese1988" wrote:
>
> The data I am trying to get is in UDCodes table. I am using LongDesc as a second key field in this instance along with CodeTypeID. I am getting zero results. The data is in the UDCodes table as I am searching for it. Any thoughts group?
>
> // Get required keys
> BOReader boReader = new BOReader(((Session)oTrans.Session).ConnectionPool);
>
> // Peform lookup
> string whereClause = String.Format("CodeTypeID = '{0}' AND LongDesc = '{1}'","MEMOSHCD",catID);
> string fieldSelect = "CodeID,CodeDesc";
>
> EpiMessageBox.Show(whereClause);
>
> DataSet dsMemoReasons = boReader.GetRows("UserCodes", whereClause, fieldSelect);
>
> EpiMessageBox.Show(dsMemoReasons.Tables.Count.ToString());
> EpiMessageBox.Show(dsMemoReasons.Tables[0].Rows.Count.ToString());
>
> // Set to EpiDataGrid
> cmbCustReasonCode.DataSource = dsMemoReasons.Tables[0];
> cmbCustReasonCode.DisplayMember = "CodeDesc";
> cmbCustReasonCode.ValueMember = "CodeDesc";
>
> // Clean Up
> boReader = null;
>
The data I am trying to get is in UDCodes table. I am using LongDesc as a second key field in this instance along with CodeTypeID. I am getting zero results. The data is in the UDCodes table as I am searching for it. Any thoughts group?

// Get required keys
BOReader boReader = new BOReader(((Session)oTrans.Session).ConnectionPool);

// Peform lookup
string whereClause = String.Format("CodeTypeID = '{0}' AND LongDesc = '{1}'","MEMOSHCD",catID);
string fieldSelect = "CodeID,CodeDesc";

EpiMessageBox.Show(whereClause);

DataSet dsMemoReasons = boReader.GetRows("UserCodes", whereClause, fieldSelect);

EpiMessageBox.Show(dsMemoReasons.Tables.Count.ToString());
EpiMessageBox.Show(dsMemoReasons.Tables[0].Rows.Count.ToString());

// Set to EpiDataGrid
cmbCustReasonCode.DataSource = dsMemoReasons.Tables[0];
cmbCustReasonCode.DisplayMember = "CodeDesc";
cmbCustReasonCode.ValueMember = "CodeDesc";

// Clean Up
boReader = null;