O'Reilly logo

Microsoft® Visual C#® 2008 Step by Step by John Sharp

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 DLINQ to Modify Data

DLINQ provides a two-way communication channel with a database. You have seen how to use DLINQ to fetch data, but you can also modify the information you have retrieved and send these changes back to the database.

Updating Existing Data

You can change the values in the Product objects in the Table<Product>collection in exactly the same way that you change the values in any ordinary object—by setting its properties. However, updating an object in memory does not update the database. To persist changes to the database, you need to generate the appropriate SQL UPDATE commands and arrange for them to be executed by the database server. You can do this quite easily with DLINQ. The following code fragment fetches product number ...

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