O'Reilly logo

Programming Microsoft® ADO.NET 2.0 Core Reference, 2nd Edition by David Sceppa

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Object Reference for SqlCommand, SqlDataReader, and SqlParameter

Now that we’ve examined the major features of the SqlCommand, SqlDataReader, and SqlParameter classes, let’s examine the properties and methods of each object.

Properties of the SqlCommand Class

Table 4-1 lists the properties of the SqlCommand class that you’re most likely to use.

Table 4-1. Commonly Used Properties of the SqlCommand Class

Property

Data Type

Description

CommandText

String

The text of the query that you want to execute.

CommandTimeout

Int32

Time (in seconds) that the adapter will wait for the query to execute before timing out. (Default = 30 seconds.)

CommandType

CommandType

Specifies the type of query to execute. (Default = Text.)

Connection

SqlConnection

The connection to your data ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required