?
Solved

difference oraclecommand oracledataadapter

Posted on 2004-09-29
1
Medium Priority
?
435 Views
Last Modified: 2008-02-01
whats is difference between oraclecommand oracledataadapter

can both be used at once
please give an example
0
Comment
Question by:DOT_NET
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 5

Accepted Solution

by:
tomasX2 earned 200 total points
ID: 12184120
a commands main purpose is to execute sql statements or stored procedures.
a dataadapters main purpose is to work with datasets

oracledataadapter needs oraclecommands to do it´s stuff and is nearly useless without one...
it has 4 command objects, selectcommand, deletecommand, insertcommand and updatecommand

you can and need to use both at once whenever you use a dataadapter.

  public DataSet SelectOracleSrvRows(DataSet dataset,string connection,string query)
{
    OracleConnection conn = new OracleConnection(connection);
    OracleDataAdapter adapter = new OracleDataAdapter();
    adapter.SelectCommand = new OracleCommand(query, conn);
    adapter.Fill(dataset);
    return dataset;
}

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdataoracleclientoraclecommandclasstopic.asp

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question