Methods provided by the command object, DOT NET Programming

What are the methods provided by the command object?

The command objects used to connect the connection object to the Datareader or the dataset. The command object provided some methods which are as shown below :-

1)Execute Non Query :- It executes the command defined in the CommandText property against the connection defined in the Connection property for a query which  does not return any row (an UPDATE, DELETE or INSERT). It returns an Integer showing the number of rows affected by the query.

2)ExecuteReader :- It executes the command defined in the Command Text property against the connection defined in the Connection property. It gives the "reader" object which is connected to the resulting rowset inside the database,& allowing the rows to be retrieved.

3)Execute Scalar :- It executes the command defined in the CommandText property against the connection defined in the Connection property. It Returns only  the single value (effectively the Ist column of the Ist row of the resulting rowset) any other returned columns &  rows are discarded. It is fast and efficient when only a "singleton" value is needed.

Posted Date: 9/24/2012 2:23:04 AM | Location : United States







Related Discussions:- Methods provided by the command object, Assignment Help, Ask Question on Methods provided by the command object, Get Answer, Expert's Help, Methods provided by the command object Discussions

Write discussion on Methods provided by the command object
Your posts are moderated
Related Questions
31: Need to develop Doctor Appointments application in .NET Project Description: I am seeking a .NET Web application which can do the subsequent: 1. Taking doctors and

What are Attributes?  Attributes are declarative tags in code that insert additional metadata into an assembly. There exist two types of attributes in the .NET Framework: Prede

We need Asp.net expert with simple html I am in search of a long term asp.net developer to build as well as maintain a volleyball player management website. We would like to inc

I want high skilled C++ programmers Project Description: I want to hire the developer, who are proficient in C/C++ and have experience with STL and work with the data structu


Consumer and Dealer management Project Description: Need to code the existing UI for relative and CRUD automation. Prepare CRUD for almost 7-10 forms with search and repor

Construct a .NET wrapper for a C++ Dll - repost Project Description: We have a classic VC++ Dll (source code of DLL not required) that requires a .NET wrapper built by you. U

What is "AutoPostBack" feature in ASP.NET? If we want to control the automatically postback in case of any event, we will need to check the attribute as true. For example on a

How many types of diagrams are there in UML? There are nine types of diagrams in the UML as shown below:- 1)Use case diagram: The use case diagram describe "WHAT" of a

what is the code for calculator in windowsapplication