Hi,
I know it's possible to have transactions with Typed DataSet, but I have yet
to find an example of it.
For example, I have two typed TableAdapter
CommerceDataSet.xsd
CustomerTableAdapater
Insert(@CustomerName)
OrdersTableAdapater
Insert(@CustomerID, @ProductID)
My sample code
CustomerTableAdapater customer = new CustomerTableAdapater();
OrdersTableAdapater orders = new OrdersTableAdapater();
String customername = blah;
int customerid = 0, productid=0;
.....
......
customer.insert(customername);
.....
orders.insert(customerid,productid);
....
How do I hook up transaction to both "Insert" method, if one fails, roll
back? I have projects to finish up quickly in a month, and I prefer to use
these typed datatable as my datalayer for now as it does mostly what I
needed instead of implementing a whole layer myself manually using
EnterpriseLibrary which really gets me the same result against sql server
2000. Once I have this transaction issue resolved, I'm good to go.
Another question, what's your opinion in terms of implement my data layer
using Typed DataSet instead of my own classes? I do it right now beause it's
quicker, mainly saves me a lot keystrokes considerably. What other benefit
do you see? Just curious.
Thanks