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 a gateway or Router? A node that is linked to two or more networks is commonly called as router or Gateway. It generally forwards message from single network to another

We are seeking for online invoice OCR solution. That will help us to automate accounts payable function. User could be able to use the existing pdf file or scan a document, then

Medical related application in .NET (document, Videos editing must) Project Description: I am seeking a .NET Web application which can do the subsequent: 1. Taking patient

What is Difference between NameSpace and Assembly? Following are the differences among namespace and assembly: Assembly is physical grouping of logical units, Namespace, log

State the differences between the Dispose () and Finalize(). CLR uses the Dispose and Finalize methods to perform garbage collection of run-time objects of .NET applications.


Duplicate a Website I need a customer management site Please help me out and what I need to get. I need all charteristics of above mentioned site a) Effects b) Mobil

HWID Spoofed for Windows 7, 8 x64 Project Description: I require a simple program that will spoof my hardware id. I could be able to write the id to spoof to in the program a

Describe session handling in a web farm, how does it work and what are the limits ?    In ASP.NET there are three ways to manage session objects. One support the in-proc mechani

Project Description: We are seeking Mobile game developer for long time our budget is per project Skills required: Mobile Phone, .NET