16
Answers

rollback of last updated queries in sql server

Photo of Ravi Shekhar

Ravi Shekhar

11y
1.4k
1


Hello seniors,

I have two  buttons. On the click of first button i update some rows in sql server table.
but my operation will complete after click on second button.

suppose after clicking on first button my server will close enexpectedly or someone close server directly. 
Is there any option availiable in sql server to rollback my last update query if the server is down enexpectedly.


Please give suggestion.

Answers (16)

1
Photo of Prakash Kumar
NA 1.6k 46.7k 8y
Refer this link,
 
http://www.c-sharpcorner.com/blogs/dynamic-menu-in-wpf122 
0
Photo of vipin kv
NA 200 0 8y
ViewModel
-------------------- 
public class MenuItemViewModel
{
public MenuItemViewModel()
{
this.MenuItems = new List<MenuItemViewModel>();
}
public string Text { get; set; }
public IList<MenuItemViewModel> MenuItems { get; private set; }
}
 
XAML Code
----------------------- 
<Window.Resources>
<HierarchicalDataTemplate DataType="{x:Type self:MenuItemViewModel}"
ItemsSource="{Binding Path=MenuItems}">
<ContentPresenter Content="{Binding Path=Text}" />
</HierarchicalDataTemplate>
</Window.Resources>
<DockPanel>
<Menu DockPanel.Dock="Top" ItemsSource="{Binding Path=MenuItems}" />
<Grid />
</DockPanel>