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 GetManualDailyS plits(string prmLocationID, string
prmType, DateTime prmEffectiveDat e)
{
CRUDXHelper myCRUDXHelper = new CRUDXHelper("St orePlanner",
"TrackerGetUser DailySplits");
myCRUDXHelper.A ddInParam("Loca tionID", DbType.String,
prmLocationID);
myCRUDXHelper.A ddInParam("Type ", DbType.String, prmType);
myCRUDXHelper.A ddInParam("Effe ctiveDate", DbType.DateTime ,
prmEffectiveDat e);
return (myCRUDXHelper. GetRowBy());
}
This row of data should be of the form
PercentSat,Perc entSun,PercentM on,...,PercentF ri
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 GetManualDailyS plits(string prmLocationID, string
prmType, DateTime prmEffectiveDat e)
{
CRUDXHelper myCRUDXHelper = new CRUDXHelper("St orePlanner",
"TrackerGetUser DailySplits");
myCRUDXHelper.A ddInParam("Loca tionID", DbType.String,
prmLocationID);
myCRUDXHelper.A ddInParam("Type ", DbType.String, prmType);
myCRUDXHelper.A ddInParam("Effe ctiveDate", DbType.DateTime ,
prmEffectiveDat e);
return (myCRUDXHelper. GetRowBy());
}
This row of data should be of the form
PercentSat,Perc entSun,PercentM on,...,PercentF ri
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?
Comment