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
What is the difference between the Clone() and Copy() methods of the DataSet class? The Clone() method copies only the structure of a DataSet. The copied structure having all t

Webservices as such do not have any mechanism by which they can maintain their state. The Webservices can access ASP.NET intrinsic objects such as application, session and many mor

What is the Scope of public/private/friend/protected/protected friend? Scope of public/private/friend/protected/protected friend Visual Basic/Visual C# Public/public all

What are the criteria necessary for an effective and efficient network? a. Performance It can be measured in several ways, including transmit time and response time. b

What is the difference amonga system workflow and a human workflow? A system workflow is a workflow that is developed to automate interactions between applications. Such workfl

I need Windows Phone App (WP 8 and above) I am seeking an app developer/designer to develop me a Windows Phone app. This will be an app where users will post questions in the

How do we connect to SQL SERVER, which namespace do we use ? The code is shown below, after that i will  give the explanation for it. For this sample we will also require a SQL

What is cloud computing? The cloud computing is the computing which is completely based on the Internet. It can also be explained as the next stage in the evolution of the Inte

Project Description: Overview: Prepare Windows program that runs in the background and on start up on the client's computer that grabs CERTAIN data from a.SDF file (SQL Serve

VB.NET Questions Project Description: Need help to solve questions of VB.NET Skills required: .NET, Software Development, C# Programming, Visual Basic, Windows Deskt