bindingcontext or datarow ?

  • Thread starter Thread starter Agnes
  • Start date Start date
A

Agnes

My form got over 30 textbox, some textbook suggest to use Bindingcontext
method. to addnew/update.
However, some other box didn't mention 'bindingcontext', it gives me a
simple sample by using datarow.

so, which ray I should use ??
Thanks
 
Hi Agnes,

If you are able to use the binding, than use it, it saves you a lot of
coding while it makes your program is very consistent.

Cor
 
However, or,I should describe my problem in detail.
myHeadetables got over 10,000 records, and over a hundred fields to be
filled in (everytime)
Case a) If I use dataadaptor, i need to process sqlcommand."select
*....from" first, and fill in my dataset. then i can process datarow.new()
or . binding..addnew()..etc.
Case b) I also can use insert command to insert the data as the user press
"ADD" & "SAVE" button.
It seems that Case A) will get much slower if the user only want to input
the new record but not search anything else.
I prefer case b) .Any expertise here can give me some hints ??
 
HI Agnes,

You should never read 10.000 records in one time.

There are a 10.000 or more scenarios, one of them create a select distinct
(gives you only the main keys) with what you fill a combobox, after the
select of the proper key from the combobox you do a

Select ..... where X = @comboboxparameter

And that is the data to proces, in my opinion will your user be much hapier
with such a scenario than scrolling throuhg 10.000 rows

I hope this helps?

Cor
Cor
 
Thanks for your advice,
However, i didn't know too much about adaptor. the text book always give me
the samples is.
Dim da = new sqldataadatpr("select xxxxxx)
ds = new dataset("table")
da.fill(ds)
.......
da.update()
It seems I needt to "SELECT everything first" , if my tables got over
10,000. will it too slow ???
My aim is so simple that "insert a new record".
Please help ~~
 
Back
Top