asp.net transactions

G

Guest

Hi,

I am very new to asp.net transactions and had a quick query would the
following code work? so if either there was a problem with the Table Adapter
inserting the record or the Membership API failing to create the user the
whole process would roll back? Thanks Ash

ClientTableAdapter adapter = new ClientTableAdapter();

using (TransactionScope ts = new TransactionScope())
{
adapter.Insert(CompanyName.Text,
Premises.Text,
AddressLine1.Text,
AddressLine2.Text,
City.Text,
County.Text,
Postcode.Text,
Country.Text,
PhoneNo.Text,
FaxNo.Text,
EmailAddress.Text);

Membership.CreateUser(Username.Text, Password.Text);

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top