Hi
I basically create a dataset and read in a schema file into the dataset. Then when done saving a record to the dataset I save to file as diffgram. When I come back in and recreate the dataset I need to find a particular record that is in the dataset. I do this with the following
code
<code
private void FindTodaysDSRec(
string sDate, sRecFind
DateTime dDate = DateTime.Now
dDate = dDate.AddDays(-1)
// sDate = dDate.ToString("d", DateTimeFormatInfo.InvariantInfo)
sDate = @"12/1/2003"
sRecFind = "MR_Date = " + sDate
nRow2 = dsDiff.Tables["MN"].Select(sRecFind)
</code
The record I am looking for exists in dataset but I get a nullrefexception on the select statement.
Here is what the MR_Date is represented as in the schema file
<code><xs:element name="MR_Date" type="xs:dateTime" msdata:AutoIncrement="false" /></code
Here is what is in the diffgram
<code><Table diffgr:id="Table1" msdata:rowOrder="0"><MR_ID>110</MR_ID><MR_Date>2003-12-01T00:00:00.0000000-05:00</MR_Date></code
The sDate statement in the select looks like this
sDate = "MR_Date = 12/1/2003
So what am I doing wrong with my select clause in code above
Thanks
J