July 2003
Intermediate to advanced
736 pages
16h 35m
English
The OleDbCommand and SqlCommand classes represent the objectification of stored procedures and SQL. You need a way to send SQL text, stored procedures, and their incumbent parameters to data providers, and in .NET, you use the command object for this purpose. Listing 11.7 provides an example showing how to use a command object. Chapter 12 includes an example using a stored procedure.
Private Sub InitializeGridWithCommand() Dim Connection As OleDbConnection = _ New OleDbConnection(Database.ConnectionString) Dim Command As OleDbCommand = _ New OleDbCommand("SELECT * FROM CUSTOMERS", Connection) Dim Adapter As OleDbDataAdapter = _ New OleDbDataAdapter(Command) ... |
Read now
Unlock full access