Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > OleDbDataAdapter vs OleDbCommand

Reply
Thread Tools

OleDbDataAdapter vs OleDbCommand

 
 
darrel
Guest
Posts: n/a
 
      11-23-2005
When retrieving data, I typically use an OleDbDataAdapter.

When updating data, I normally use an OleDbCommand. But it seems as if a
OleDbDataAdapter would work just fine too.

What is the general rules of thumb for using one over the other for a given
DB query?

-Darrel


 
Reply With Quote
 
 
 
 
Scott M.
Guest
Posts: n/a
 
      11-24-2005
DataAdapters only work because of Command objects that it wraps around.

What's nice about DataAdapters is that they have the ability to invoke the
correct Command with simple method calls. In other words, they are a
convienience. There are no rules of thumb for their use.

"darrel" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> When retrieving data, I typically use an OleDbDataAdapter.
>
> When updating data, I normally use an OleDbCommand. But it seems as if a
> OleDbDataAdapter would work just fine too.
>
> What is the general rules of thumb for using one over the other for a
> given DB query?
>
> -Darrel
>



 
Reply With Quote
 
 
 
 
S.M. Altaf [MVP]
Guest
Posts: n/a
 
      11-25-2005

It'd all be on personal preference and the architecture of the application.
When using all SPs for data retrieval, for example, you wouldn't use any
dataadapters.

--------------------------------------------------------------------------------
All that glitters has a high refractive index.
www.mendhak.com


"Scott M." <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> DataAdapters only work because of Command objects that it wraps around.
>
> What's nice about DataAdapters is that they have the ability to invoke the
> correct Command with simple method calls. In other words, they are a
> convienience. There are no rules of thumb for their use.
>
> "darrel" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> When retrieving data, I typically use an OleDbDataAdapter.
>>
>> When updating data, I normally use an OleDbCommand. But it seems as if a
>> OleDbDataAdapter would work just fine too.
>>
>> What is the general rules of thumb for using one over the other for a
>> given DB query?
>>
>> -Darrel
>>

>
>



 
Reply With Quote
 
Scott M.
Guest
Posts: n/a
 
      11-25-2005
Well, sure you could use DataAdapters with SP's, the commands would just be
configured to a storedproc commandtype, just as you'd need to do without the
DataAdapter.

SP's don't really make any difference in determining if you should use a DA.
The DA still provides the "automatic" execution of the correct command
object based on changes made to the local dataset.



"S.M. Altaf [MVP]" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>
> It'd all be on personal preference and the architecture of the
> application. When using all SPs for data retrieval, for example, you
> wouldn't use any dataadapters.
>
> --------------------------------------------------------------------------------
> All that glitters has a high refractive index.
> www.mendhak.com
>
>
> "Scott M." <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> DataAdapters only work because of Command objects that it wraps around.
>>
>> What's nice about DataAdapters is that they have the ability to invoke
>> the correct Command with simple method calls. In other words, they are a
>> convienience. There are no rules of thumb for their use.
>>
>> "darrel" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> When retrieving data, I typically use an OleDbDataAdapter.
>>>
>>> When updating data, I normally use an OleDbCommand. But it seems as if a
>>> OleDbDataAdapter would work just fine too.
>>>
>>> What is the general rules of thumb for using one over the other for a
>>> given DB query?
>>>
>>> -Darrel
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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
OleDbDataAdapter created in code behaves differently from one created by wizard. tom c ASP .Net 6 09-06-2006 04:46 PM
[BUG?] (2) Update database using stored procedure and OleDbDataAdapter.Update joun ASP .Net 5 11-30-2004 06:51 PM
[BUG?] Update database using stored procedure and OleDbDataAdapter.Update joun ASP .Net 9 11-30-2004 04:57 AM
how do I get the ID of a row I just added using OleDbDataAdapter.Update() ? Bennett Haselton ASP .Net 1 10-18-2004 02:47 PM
Issues with OledbDataAdapter.Update() amessimon ASP .Net 1 05-02-2004 05:27 AM



Advertisments