ADO.NET Bug?

  • Thread starter Thread starter Kevin Yu
  • Start date Start date
K

Kevin Yu

hi all

I posted this question here a while ago, but no one can answer it. don't
know if all the MVP are too busy answering some other questions.
anyway, I have this *bug* in my ado.net app, I have data fields from oracle
database in a winform binded to all kind of controls, but I am not
fill the dataset will all records (think we are not supposed to do that, at
least not for a hundreds and hundreads of result records from the database)
instead, the user will enter the unique ID of the record to look it up. for
the first time the dataset is filled, all controls display the correct info.
but when the user enter another ID, the app will clear the dataset like
this:

dsSomeDataset.Tables["someTable"].clear();


then fill it with the new record found. that's when the problem comes. there
is always this one control in the winform won't update itself with
the record info. if another control is added to the winform, then the added
control become the one that won't update itself after the refill.(by
the way, all controls are in a tapcontrol, it maybe the tapcontrol problem,
because if the user switch to another tap page and swith back, then
all controls will update themselves with correct info, because the binding
method is called again)

is it my design problem of it's the winform binding bug? anyone?

thx in advance.


Kevin
 
Hi Kevin,

One of the problems can be that you bind it again.
Than you should clear the binding also, however you only have to bind it
only once, also in the way you do it. (That is the way I like it).

I set a bool/flag when it is binded the first time and bind it only once,
maybe you can look if that solves your problem, otherwise I think you would
send a piece of code.

I do not know if your name is real Kevin Yu, but if that is so, I would
change your nick.
There is already a Kevin in this newsgroup active.

I hope this helps,

Cor
 
Back
Top