OleDbDataAdapter vs OleDbCommand

Discussion in 'ASP .Net' started by darrel, Nov 23, 2005.

  1. darrel

    darrel Guest

    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
     
    darrel, Nov 23, 2005
    #1
    1. Advertising

  2. darrel

    Scott M. Guest

    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" <> wrote in message
    news:...
    > 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
    >
     
    Scott M., Nov 24, 2005
    #2
    1. Advertising

  3. 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." <> wrote in message
    news:...
    > 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" <> wrote in message
    > news:...
    >> 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
    >>

    >
    >
     
    S.M. Altaf [MVP], Nov 25, 2005
    #3
  4. darrel

    Scott M. Guest

    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]" <> wrote in message
    news:%...
    >
    > 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." <> wrote in message
    > news:...
    >> 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" <> wrote in message
    >> news:...
    >>> 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
    >>>

    >>
    >>

    >
    >
     
    Scott M., Nov 25, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. amessimon

    Issues with OledbDataAdapter.Update()

    amessimon, Apr 30, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    3,254
    Natty Gur
    May 2, 2004
  2. Bennett Haselton
    Replies:
    1
    Views:
    3,420
    Bennett Haselton
    Oct 18, 2004
  3. joun
    Replies:
    9
    Views:
    2,280
    W.G. Ryan eMVP
    Nov 30, 2004
  4. joun
    Replies:
    5
    Views:
    2,706
  5. tom c
    Replies:
    6
    Views:
    524
    tom c
    Sep 6, 2006
Loading...

Share This Page