469,646 Members | 1,633 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,646 developers. It's quick & easy.

what is difference between SqlTransaction and T-Sql(begin tran, commit tran, rollback tran)

what is difference between SqlTransaction and T-Sql(begin tran, commit
tran, rollback tran)

thanks.

Nov 17 '05 #1
3 4282
SqlTransaction is a class that calls TSql for you.

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

"Junyin.Wu" <ta**********@gmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
what is difference between SqlTransaction and T-Sql(begin tran, commit
tran, rollback tran)

thanks.

Nov 17 '05 #2
you mean:
-----
SqlConnection.BeginTransaction();
SqlTransaction.Commit();
SqlTransaction.Rollback();
----
are equal to
---
SqlCommand.CommandText = "Begin Tran" // "Commit Tran" // "Rollback
Tran";
SqlCommand.ExecuteNonQurey();
----
?

Thanks.

Nov 18 '05 #3
Yup.

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

"Junyin.Wu" <ta**********@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
you mean:
-----
SqlConnection.BeginTransaction();
SqlTransaction.Commit();
SqlTransaction.Rollback();
----
are equal to
---
SqlCommand.CommandText = "Begin Tran" // "Commit Tran" // "Rollback
Tran";
SqlCommand.ExecuteNonQurey();
----
?

Thanks.

Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Kristoff Six | last post: by
2 posts views Thread by mahajan.sanjeev | last post: by
5 posts views Thread by Piotr Strycharz | last post: by
9 posts views Thread by John Sidney-Woollett | last post: by
7 posts views Thread by fyi85 | last post: by
reply views Thread by eric.goforth | last post: by
3 posts views Thread by sajithamol | last post: by
15 posts views Thread by =?Utf-8?B?UGhpbCBKb2huc29u?= | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.