Solved

difference oraclecommand oracledataadapter

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
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.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now