Methods of the Command Objects with databases?

The Command object is represented by two corresponding classes: SqlCommand and OleDbCommand. Command objects are used to execute statements (commands) to a database via a data connection. The Command objects can be used to execute stored procedures on the Database, SQL statements, or return complete tables directly. Command objects provide three methods that are used to execute commands on the database:
  • ExecuteNonQuery. Executes direct SQL commands, such as INSERT, UPDATE or DELETE.
  • ExecuteScalar. Returns a single value from a Database Query.
  • ExecuteReader. Returns a result set by way of a DataReader object.
Written by Sandeep Mogulla, Webmaster at www.startvbdotnet.com

Index

 
Printer friendly version of the FAQ-ADONET-Command-Object-With-Databases page


Sponsored links

.Net Application Updating
One easy to use component adds safe and reliable updating features. Download today for a free trial.
BugSplat - Automatic Crash Analysis
Fast online exception analysis. Capture customer crash data online.
.Net Localization Tool Sisulizer
Localize your .Net apps: ResX and assemblies. Database, XML & HTML Help localization. Try Sisulizer!
CSTSOFT Instrumentation .NET & ActiveX Components
A collection of 13 instrumentation .NET/ActiveX/VCL components including Gauge,Knob,LED,Trend etc.
Web based bug tracking - AdminiTrack.com
AdminiTrack offers an effective web-based bug tracking system designed for professional software development teams.

Advertisement



Free Magazine

Free Magazines
eWeek The essential technology information source for builders of e-business.... subscribe now

Newsletter | Submit Content | About | Advertising | Awards | Contact Us | Link to us |
© 1996-2008 Community Networks Ltd All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Synchron Data - .NET development.