O'Reilly logo

Developing and Implementing Windows®-Based Applications with Visual C#™ .NET and Visual Studio® .NET Exam Cram™ 2 (Exam 70-316) by Priti Kalani, Amit Kalani, Kalani Kirk Hausman

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

Querying SQL Server

T-SQL statements are used to manipulate the data present within an SQL Server database. These commands can be passed in an ad-hoc manner to the server or can be compiled as stored procedures on the server itself. The advantage of using stored procedures is that they are faster than ad-hoc queries. The disadvantage of stored procedures is that they are not as flexible as ad-hoc queries, which can be created within your application at runtime.

Ad-Hoc Queries

Microsoft provides several methods to allow you to execute ad-hoc queries:

  • Visual Studio .NET IDE— Using the Server Explorer, you can create a new view within the Views folder of a Data Connection object. When you run this query, the results are displayed.

  • OSQL— This command-line ...

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