O'Reilly logo

Programming Microsoft® ADO.NET 2.0 Core Reference, 2nd Edition by David Sceppa

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

Return of the DataAdapters!

Consider the following basic scenario. You want to create a simple data-access layer—a component that lets you connect to your database, returns information about a particular order, and can submit pending changes back to the database. You want a simple way to create this component—one that allows you to write a minimum of code—but you don’t want to rely on TableAdapters for reasons we’ve previously discussed.

You can create a strongly typed DataSet and remove the TableAdapters. No major challenge there.

You already know how to create SqlConnections and SqlDataAdapters in code. You also know that you can create SqlCommandBuilders to generate updating logic, but that this approach involves (needlessly) querying the database ...

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