PC Review


Reply
Thread Tools Rate Thread

DataReader versus bindingSource

 
 
Mr. X.
Guest
Posts: n/a
 
      12th Jul 2010
Hello.
I am using DataReader.
Also using bindingSource.
At mySql.
When using DataReader, I realize that I cannot open more then one DataReader
at a time - Can I overcome this problem ?
When using BindingSource, I am using filter, but when datatable is big,
does the : MySqlDataAdapter.fill(datatable) actually do the whole select
command (select * from big|Table) and fills (for big tables, it last too
long) - I connect it to bindingSource object ?

Thanks

 
Reply With Quote
 
 
 
 
Cor
Guest
Posts: n/a
 
      13th Jul 2010
You are comparing apples and computers.

DataBinding has to do how items in a collection are bound to items in a UI.

A datareader is an feature that is to retrieve data from a database by
instance into a collection.

Some put the data from a datareader direct in the controls, but that is in
my opinion 20th century style developing.

Cor

"Mr. X." <(E-Mail Removed)> wrote in message
news:i1errq$aj3$(E-Mail Removed)...
> Hello.
> I am using DataReader.
> Also using bindingSource.
> At mySql.
> When using DataReader, I realize that I cannot open more then one
> DataReader at a time - Can I overcome this problem ?
> When using BindingSource, I am using filter, but when datatable is big,
> does the : MySqlDataAdapter.fill(datatable) actually do the whole select
> command (select * from big|Table) and fills (for big tables, it last too
> long) - I connect it to bindingSource object ?
>
> Thanks


 
Reply With Quote
 
Cor
Guest
Posts: n/a
 
      13th Jul 2010
I forgot (or probably better to answer it in two replies because it are
apples and computers),

The dataadapter uses the datareader, if you don't open and close a
connection, the dataadapter does that intrinsic for you.





"Mr. X." <(E-Mail Removed)> wrote in message
news:i1errq$aj3$(E-Mail Removed)...
> Hello.
> I am using DataReader.
> Also using bindingSource.
> At mySql.
> When using DataReader, I realize that I cannot open more then one
> DataReader at a time - Can I overcome this problem ?
> When using BindingSource, I am using filter, but when datatable is big,
> does the : MySqlDataAdapter.fill(datatable) actually do the whole select
> command (select * from big|Table) and fills (for big tables, it last too
> long) - I connect it to bindingSource object ?
>
> Thanks


 
Reply With Quote
 
Mr. X.
Guest
Posts: n/a
 
      14th Jul 2010
For the dataAdapter.fill -
If I have millions of records in db : are all the millions of records loaded
to the dataset.
or dataAdapter.fill is only logical ?

Thanks

"Cor" <(E-Mail Removed)> wrote in message
news:4c3c03b0$0$14131$(E-Mail Removed)...
> I forgot (or probably better to answer it in two replies because it are
> apples and computers),
>
> The dataadapter uses the datareader, if you don't open and close a
> connection, the dataadapter does that intrinsic for you.
>
>
>
>
>
> "Mr. X." <(E-Mail Removed)> wrote in message
> news:i1errq$aj3$(E-Mail Removed)...
>> Hello.
>> I am using DataReader.
>> Also using bindingSource.
>> At mySql.
>> When using DataReader, I realize that I cannot open more then one
>> DataReader at a time - Can I overcome this problem ?
>> When using BindingSource, I am using filter, but when datatable is big,
>> does the : MySqlDataAdapter.fill(datatable) actually do the whole select
>> command (select * from big|Table) and fills (for big tables, it last too
>> long) - I connect it to bindingSource object ?
>>
>> Thanks

>

 
Reply With Quote
 
Cor
Guest
Posts: n/a
 
      14th Jul 2010
Actual

"Mr. X." <(E-Mail Removed)> wrote in message
news:i1k4fk$ri3$(E-Mail Removed)...
> For the dataAdapter.fill -
> If I have millions of records in db : are all the millions of records
> loaded to the dataset.
> or dataAdapter.fill is only logical ?
>
> Thanks
>
> "Cor" <(E-Mail Removed)> wrote in message
> news:4c3c03b0$0$14131$(E-Mail Removed)...
>> I forgot (or probably better to answer it in two replies because it are
>> apples and computers),
>>
>> The dataadapter uses the datareader, if you don't open and close a
>> connection, the dataadapter does that intrinsic for you.
>>
>>
>>
>>
>>
>> "Mr. X." <(E-Mail Removed)> wrote in message
>> news:i1errq$aj3$(E-Mail Removed)...
>>> Hello.
>>> I am using DataReader.
>>> Also using bindingSource.
>>> At mySql.
>>> When using DataReader, I realize that I cannot open more then one
>>> DataReader at a time - Can I overcome this problem ?
>>> When using BindingSource, I am using filter, but when datatable is big,
>>> does the : MySqlDataAdapter.fill(datatable) actually do the whole select
>>> command (select * from big|Table) and fills (for big tables, it last too
>>> long) - I connect it to bindingSource object ?
>>>
>>> Thanks

>>

>

 
Reply With Quote
 
Armin Zingler
Guest
Posts: n/a
 
      14th Jul 2010
Am 14.07.2010 12:45, schrieb Mr. X.:
> For the dataAdapter.fill -
> If I have millions of records in db : are all the millions of records loaded
> to the dataset.
> or dataAdapter.fill is only logical ?


Only without a Where clause in the SQL.


--
Armin
 
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
linq versus BindingSource. Mr. X. Microsoft C# .NET 19 8th Sep 2010 07:48 AM
How to process datareader nulls coming from datareader? JB Microsoft C# .NET 4 3rd Nov 2008 12:56 AM
NativeMethods versus SafeNativeMethods versus UnsafeNativeMethods? (reflector) kilik3000@gmail.com Microsoft C# .NET 1 23rd May 2007 08:44 PM
DataSet versus DataReader. Which one to use? Thank You. Shapper Microsoft ASP .NET 2 22nd Apr 2005 01:29 AM
Static versus Singleton versus seperate Instantiations... Dan Bass Microsoft C# .NET 3 21st Nov 2004 11:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:52 AM.