Solved

difference oraclecommand oracledataadapter

Posted on 2004-09-29
1
428 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 50 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

696 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