Introduction
Management
Technology
ISO9001
About us
Copyright
colourful technology...
Dyetech
February 1st 2006

TableAdpaters (VS2005)

A major change in VS2005 over VS2003 is the use of table adapters (1 per datset) rather than a central data adapter.

This, combined with the use of user settings for the connection string turns out to be very powerful - especially as you can add SQL "functions" to the relevant dataset (e.g. a query function to return a computed next ID of some sort).

However - one of the downsides - tableadapters don't provide access to allow you to do a "transaction" (commit and rollback) - without adding code to the table adapter to expose the transaction itself (and apply to all commands if it's updated). In the end this is a "standard" bit of code that can be copied and pasted onto every table adapter used - but a real pity the relevant property wasn't made public in the first place!

[I suppose one of the reasons was the wish to use the new transaction mechanism requiring MS-DTC - but the SQL transaction is fine and just what's needed]

 

Comments? - Contact us here


Home
IT and Management consultancy
Copyright Dyetech 2005-7
All rights reserved