Using SqlCommands and SqlParameters
After you create the SQL statements in your code, how do you actually send the statements or commands to the database? The answer depends on the Data Provider your application is using. You have the option of using the OLEDB Data Provider or the SQL Server Data Provider. There will probably be other Data Providers made available in the future as well.
If you want to use the SQL Server Data Provider, you should use the classes defined in the System.Data.SqlClient namespace. If you want to use the OLEDB Data Provider, you should use the classes defined in theSystem.Data.OleDb namespace. And, if you want to write code that does not assume any particular Data Provider you would use the interfaces defined in System.Data ...
Get Visual Basic® .NET by Example now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.