Click here to Skip to main content
15,918,742 members
Home / Discussions / C#
   

C#

 
GeneralDynamic Properties Pin
Steve Schaneville26-May-04 15:10
professionalSteve Schaneville26-May-04 15:10 
GeneralRe: Dynamic Properties Pin
Nick Parker26-May-04 15:52
protectorNick Parker26-May-04 15:52 
GeneralRe: Dynamic Properties Pin
Steve Schaneville26-May-04 16:34
professionalSteve Schaneville26-May-04 16:34 
GeneralRe: Dynamic Properties Pin
Heath Stewart27-May-04 4:43
protectorHeath Stewart27-May-04 4:43 
GeneralRe: Dynamic Properties Pin
Steve Schaneville27-May-04 4:46
professionalSteve Schaneville27-May-04 4:46 
GeneralDesigning Window Form Shape Pin
RonBou26-May-04 14:20
RonBou26-May-04 14:20 
GeneralRe: Designing Window Form Shape Pin
Heath Stewart27-May-04 4:40
protectorHeath Stewart27-May-04 4:40 
GeneralDataset Select Error Pin
MrJJKoolJ26-May-04 12:38
MrJJKoolJ26-May-04 12:38 
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:

<b><small>
<Table diffgr:id="Table1" msdata:rowOrder="0"><MR_ID>110</MR_ID><MR_Date>2003-12-01T00:00:00.0000000-05:00<MR_Date>
</small></b>


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,

JJ
GeneralRe: Dataset Select Error Pin
Heath Stewart26-May-04 13:01
protectorHeath Stewart26-May-04 13:01 
GeneralRe: Dataset Select Error Pin
MrJJKoolJ27-May-04 15:39
MrJJKoolJ27-May-04 15:39 
GeneralRe: Dataset Select Error Pin
Heath Stewart30-May-04 6:03
protectorHeath Stewart30-May-04 6:03 
GeneralString format: Real newbie question Pin
pankajdaga26-May-04 11:23
pankajdaga26-May-04 11:23 
GeneralRe: String format: Real newbie question Pin
Nick Parker26-May-04 11:42
protectorNick Parker26-May-04 11:42 
GeneralRe: String format: Real newbie question Pin
pankajdaga26-May-04 11:51
pankajdaga26-May-04 11:51 
GeneralRe: String format: Real newbie question Pin
pankajdaga26-May-04 12:00
pankajdaga26-May-04 12:00 
GeneralRe: String format: Real newbie question Pin
Heath Stewart26-May-04 12:03
protectorHeath Stewart26-May-04 12:03 
GeneralRe: String format: Real newbie question Pin
Nick Parker26-May-04 13:32
protectorNick Parker26-May-04 13:32 
GeneralResolution independent forms Pin
MaxPredator26-May-04 10:14
MaxPredator26-May-04 10:14 
GeneralRe: Resolution independent forms Pin
Heath Stewart26-May-04 10:53
protectorHeath Stewart26-May-04 10:53 
GeneralRe: Resolution independent forms Pin
MaxPredator27-May-04 2:33
MaxPredator27-May-04 2:33 
GeneralCustom Control Initialization - first time drop on win form Pin
Member 64401626-May-04 8:59
Member 64401626-May-04 8:59 
GeneralRe: Custom Control Initialization - first time drop on win form Pin
Heath Stewart26-May-04 9:06
protectorHeath Stewart26-May-04 9:06 
Generalstrstr in VC# Pin
hubertus9526-May-04 8:52
hubertus9526-May-04 8:52 
GeneralRe: strstr in VC# Pin
Heath Stewart26-May-04 9:04
protectorHeath Stewart26-May-04 9:04 
GeneralRe: strstr in VC# Pin
Baris Kurtlutepe26-May-04 9:04
Baris Kurtlutepe26-May-04 9:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.