PC Review


Reply
Thread Tools Rate Thread

DataSet Row = null even after a successful FindByProgramID

 
 
=?Utf-8?B?Um9jaw==?=
Guest
Posts: n/a
 
      12th Dec 2005
Any clue to why this newRow call sets "programSelected" to null no matter
what I have tried?

Further explanation, this function resides in a form2 which I have been able
to give access to form1's (MainWindowReference's) public or internal
elements. Also "programSelected" is an internal global variable declared like
so: internal testSQLDataSet.programRow programSelected;.



private void openToolStripButton_Click(object sender, EventArgs e)
{
// TODO: fix problem with the programSelected being set to null
MainWindowReference.programSelected =
testSQLdatabaseDataSet.Programs.FindByProgramID((Convert.ToInt32(this.programViewDataGridView[0,this.programViewDataGridView.CurrentRow.Index].EditedFormattedValue)));
this.Close();
}


 
Reply With Quote
 
 
 
 
Patrice
Guest
Posts: n/a
 
      14th Dec 2005
Well, my first thought would be :
- FindProgramID doesn't return the row properly
- there is no match found...

IMO the problme would be in FindByProgramByID, check also your are looking
for the right key...

---
Patrice

"Rock" <(E-Mail Removed)> a écrit dans le message de
news:E5CFC243-6EDB-407F-A6CE-(E-Mail Removed)...
> Any clue to why this newRow call sets "programSelected" to null no matter
> what I have tried?
>
> Further explanation, this function resides in a form2 which I have been

able
> to give access to form1's (MainWindowReference's) public or internal
> elements. Also "programSelected" is an internal global variable declared

like
> so: internal testSQLDataSet.programRow programSelected;.
>
>
>
> private void openToolStripButton_Click(object sender, EventArgs e)
> {
> // TODO: fix problem with the programSelected being set to

null
> MainWindowReference.programSelected =
>

testSQLdatabaseDataSet.Programs.FindByProgramID((Convert.ToInt32(this.progra
mViewDataGridView[0,this.programViewDataGridView.CurrentRow.Index].EditedFor
mattedValue)));
> this.Close();
> }
>
>



 
Reply With Quote
 
=?Utf-8?B?Um9jaw==?=
Guest
Posts: n/a
 
      28th Dec 2005
Thanks for your reply and sorry it took me so long to respond. I did check to
make sure the FindProgamID returns the correct type. I would hesitate to jump
to the conclusion the it simply has trouble returning a type. Also I do know
that I am trying to access keys that are indeed valid.
 
Reply With Quote
 
=?Utf-8?B?Um9jaw==?=
Guest
Posts: n/a
 
      28th Dec 2005
Are there any other suggestions that can be made, even perhaps a different
way of acomplishing the same tasks, which is explained in the second
paragraph of my original post?
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: null in dataset in C#? Marina Levit [MVP] Microsoft ASP .NET 0 18th Dec 2006 05:39 PM
Re: null in dataset in C#? Mark Rae Microsoft ASP .NET 0 18th Dec 2006 05:39 PM
Successful burn, Successful install, Nice OS gs Windows Vista General Discussion 4 20th Jun 2006 10:40 AM
dataset's NULL value =?Utf-8?B?TGkgV2VuZw==?= Microsoft Dot NET 1 24th Nov 2005 02:34 AM
Null value from dataset =?Utf-8?B?QUJO?= Microsoft ADO .NET 1 4th Mar 2004 06:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:02 AM.