ABSTRACT

The Command class CommandText property represents an SQL statement. Placeholders can be used to represent fields in an SQL statement that will be replaced with values at runtime. The type of placeholder depends on the type of data adapter:

• With OleDbDataAdapter, question marks, “?,” are used to identify the parameters because the OLE DB.NET Provider does not support named parameters. The parameters must be provided in an order corresponding to the position of its placeholder

• With SqlDataAdapter, named placeholders are required. The name must be preceded with an “@” sign, for example, “@StudentID.”