HighTechTalks DotNet Forums  

OleDbDataAdapter vs OleDbCommand

Dotnet FAQs microsoft.public.dotnet.faqs


Discuss OleDbDataAdapter vs OleDbCommand in the Dotnet FAQs forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
darrel
 
Posts: n/a

Default OleDbDataAdapter vs OleDbCommand - 11-23-2005 , 02:41 PM






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
  #2  
Old   
Scott M.
 
Posts: n/a

Default Re: OleDbDataAdapter vs OleDbCommand - 11-24-2005 , 11:39 AM






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" <notreal (AT) nowhere (DOT) com> wrote

Quote:
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
  #3  
Old   
S.M. Altaf [MVP]
 
Posts: n/a

Default Re: OleDbDataAdapter vs OleDbCommand - 11-25-2005 , 09:38 AM




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." <s-mar (AT) nospam (DOT) nospam> wrote

Quote:
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" <notreal (AT) nowhere (DOT) com> wrote in message
news:OgJHsXG8FHA.1484 (AT) tk2msftngp13 (DOT) phx.gbl...
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
  #4  
Old   
Scott M.
 
Posts: n/a

Default Re: OleDbDataAdapter vs OleDbCommand - 11-25-2005 , 10:37 AM



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]" <smaltaf (AT) PLEASEDONTSPAMMEmsn (DOT) com> wrote

Quote:
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." <s-mar (AT) nospam (DOT) nospam> wrote in message
news:OENoSWR8FHA.2816 (AT) tk2msftngp13 (DOT) phx.gbl...
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" <notreal (AT) nowhere (DOT) com> wrote in message
news:OgJHsXG8FHA.1484 (AT) tk2msftngp13 (DOT) phx.gbl...
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 Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.