Hi,
When I tried to get the max value of a field using the GetScalar() method in a empty table throws runtime error. I want to return zero if there is no data in the table. The current code(Adapter) is as follows:
var maxLId = localAdapter.GetScalar(LanguageFields.Lid, AggregateFunction.Max);
maxLocalLanguageId = Convert.ToInt16(maxLId);
Is any other way to return zero if no rows are present in the table?