O'Reilly logo

ADO.NET Programming in Visual Basic™ .NET by Bob Howell, Steve Holzner

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

The Command Class

This class is used to execute commands against the database. The command can be an SQL statement, a stored procedure, or the name of a table or view. The Command class contains a collection of parameter objects for use in passing values to a stored procedure or SQL statement. The class also contains its own connection object. You can pass in an already created connection object or you can create one directly in the Command class. Either way, the Command class only holds a reference to a connection object so there are no excess connections that will be opened to the server.

There are three different kinds of commands that can be executed by the Command class. These commands are executed by calling one of four execute methods: ...

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