M
mcbobin
Hi,
Here's hoping someone can help...
I'm using a stored procedure to return a single row of data ie a
DataRow
e.g.
public static DataRow GetManualDailySplits(string prmLocationID, string
prmType, DateTime prmEffectiveDate)
{
CRUDXHelper myCRUDXHelper = new CRUDXHelper("StorePlanner",
"TrackerGetUserDailySplits");
myCRUDXHelper.AddInParam("LocationID", DbType.String,
prmLocationID);
myCRUDXHelper.AddInParam("Type", DbType.String, prmType);
myCRUDXHelper.AddInParam("EffectiveDate", DbType.DateTime,
prmEffectiveDate);
return (myCRUDXHelper.GetRowBy());
}
This row of data should be of the form
PercentSat,PercentSun,PercentMon,...,PercentFri
e.g.
10.0 20.0 20.0 5.0 20.0 10.0 15.0
Sometimes, there will be absolutely no data to return (i.e. no DataRow
is returned) and when this happens, my c# code is throwing an
exception.
So, how do I check if the DataRow is empty?
Here's hoping someone can help...
I'm using a stored procedure to return a single row of data ie a
DataRow
e.g.
public static DataRow GetManualDailySplits(string prmLocationID, string
prmType, DateTime prmEffectiveDate)
{
CRUDXHelper myCRUDXHelper = new CRUDXHelper("StorePlanner",
"TrackerGetUserDailySplits");
myCRUDXHelper.AddInParam("LocationID", DbType.String,
prmLocationID);
myCRUDXHelper.AddInParam("Type", DbType.String, prmType);
myCRUDXHelper.AddInParam("EffectiveDate", DbType.DateTime,
prmEffectiveDate);
return (myCRUDXHelper.GetRowBy());
}
This row of data should be of the form
PercentSat,PercentSun,PercentMon,...,PercentFri
e.g.
10.0 20.0 20.0 5.0 20.0 10.0 15.0
Sometimes, there will be absolutely no data to return (i.e. no DataRow
is returned) and when this happens, my c# code is throwing an
exception.
So, how do I check if the DataRow is empty?