Hello,
My names Alex, I'm new to Epicor development and come from a strong PHP background. So all this is a little bit different!
I've been having some issues the last few days trying to build up a simple select statement with 2 conditions. I wondered if I was to put some code below would anyone be able to shed some light on the problem?
--------------------------------------------------------------------------------------------------------------------------------------------
this._ud05Adapter = new UD05Adapter(this.oTrans);
this._ud05Adapter.BOConnect();
// Add Adapter Table to List of Views
// This allows you to bind controls to the custom UD Table
this._edvUD05 = new EpiDataView();
this._edvUD05.dataView = new DataView(this._ud05Adapter.UD05Data.UD05);
this._edvUD05.AddEnabled = true;
this._edvUD05.AddText = "New UD05";
if ((this.oTrans.EpiDataViews.ContainsKey("UD05View") == false))
{
this.oTrans.Add("UD05View", this._edvUD05);
}
System.Collections.Hashtable whereClauses = new System.Collections.Hashtable(1);
string whereClause = "UD05.ShortChar03 = '" + CurrentJobNumber + "'";
whereClauses.Add("UD05", whereClause);
// Call the adapter search.
SearchOptions searchOptions = SearchOptions.CreateRuntimeSearch(whereClauses, DataSetMode.RowsDataSet);
--------------------------------------------------------------------------------------------------------------------------------------------
The above on it's own seems to work just fine however when applying a second condition to the code...
--------------------------------------------------------------------------------------------------------------------------------------------
System.Collections.Hashtable whereClauses = new System.Collections.Hashtable(1);
string whereClause = "UD05.ShortChar03 = '" + CurrentJobNumber + "' AND UD05.Number01 IN (" + strMtlSeqListing + ")";
whereClauses.Add("UD05", whereClause);
--------------------------------------------------------------------------------------------------------------------------------------------