O'Reilly logo

Visual Basic® .NET by Example by Bob Donald, Gabriel Oancea

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

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 ...

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