Search Results

Search found 1486 results on 60 pages for 'triggers'.

Page 4/60 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Triggers in Entity Framework - Need advice

    - by jaklucky
    Hi all, I am new to Entity Framework and please pardon my ignorance. We have a simple application written using SQL Server and ADO.Net. Now we have got a new requirement that, whenever a particular rows get updated by our application, some business logic has to happen. I have been looking into Triggers in SQL server and it looks like we can do it using triggers. I am also looking at Entity Framework's OnPropertyChange capability. Is it possible to do it with "OnPropertyChange"? I mean, Can I create a model and implement "OnPropertyChange" method? And when our application modifies the rows using ADO.Net, then will it fire "OnPropertyChange" event so that my custome code in "OnPropertyChange" excutes? Thank you in advance for your inputs, Suresh

    Read the article

  • AlarmManager triggers PendingIntent too soon

    - by Wezelkrozum
    I've searched for 3 days now but didn't find a solution or similar problem/question anywhere else. Here is the deal: Trigger in 1 hour - works correct Trigger in 2 hours - Goes of in 1:23 Trigger in 1 day - Goes of in ~11:00 So why is the AlarmManager so unpredictable and always too soon? Or what am I doing wrong? And is there another way so that it could work correctly? This is the way I register my PendingIntent in the AlarmManager (stripped down): AlarmManager alarmManager = (AlarmManager)parent.getSystemService(ALARM_SERVICE); Intent myIntent = new Intent(parent, UpdateKlasRoostersService.class); PendingIntent pendingIntent = PendingIntent.getService(parent, 0, myIntent, PendingIntent.FLAG_UPDATE_CURRENT); //Set startdate of PendingIntent so it triggers in 10 minutes Calendar start = Calendar.getInstance(); start.setTimeInMillis(SystemClock.elapsedRealtime()); start.add(Calendar.MINUTE, 10); //Set interval of PendingIntent so it triggers every day Integer interval = 1*24*60*60*1000; //Cancel any similar instances of this PendingIntent if already scheduled alarmManager.cancel(pendingIntent); //Schedule PendingIntent alarmManager.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, start.getTimeInMillis(), interval, pendingIntent); //Old way I used to schedule a PendingIntent, didn't seem to work either //alarmManager.set(AlarmManager.RTC_WAKEUP, start.getTimeInMillis(), pendingIntent); It would be awesome if anyone has a solution. Thanks for any help! Update: 2 hours ago it worked to trigger it with an interval of 2 hours, but after that it triggered after 1:20 hours. It's getting really weird. I'll track the triggers down with a logfile and post it here tomorrow. Update: The PendingIntent is scheduled to run every 3 hours. From the log's second line it seems like an old scheduled PendingIntent is still running: [2012-5-3 2:15:42 519] Updating Klasroosters [2012-5-3 4:15:15 562] Updating Klasroosters [2012-5-3 5:15:42 749] Updating Klasroosters [2012-5-3 8:15:42 754] Updating Klasroosters [2012-5-3 11:15:42 522] Updating Klasroosters But, I'm sure I cancelled the scheduled PendingIntent's before I schedule a new one. And every PendingIntent isn't recreated in the same way, so it should be exactly the same. If not , this threads question isn't relevant anymore.

    Read the article

  • How can I automatically generate sql update scripts when some data is updated ?

    - by Brann
    I'd like to automatically generate an update script each time a value is modified in my database. In other words, if a stored procedure, or a query, or whatever updates column a with value b in table c (which as a pk column (i,j...k), I want to generate this : update c set a=b where i=... and j=... and k=... and store it somewhere (for example as a raw string in a table). To complicate things, I want the script to be generated only if the update has been made by a specific user. Good news is that I've got a primary key defined for all my tables. I can see how to do this using a trigger, but I would need to generate specific triggers for each table, and to update them each and every-time my schema changes. I guess there are some built-in ways to do this as SQL server sometimes need to store this kind of things (while using transactional replication for example), but couldn't find anything so far ... any ideas ? I'm also interested in ways to automatically generate triggers (probably using triggers - meta triggers, huh? - since I will need to update triggers automatically when the schema change)

    Read the article

  • How to convert a MSSQL database (including procedures, functions and triggers) to a firebird databas

    - by user193655
    I am considering migrating to Firebird. To have a "quick start" approach I downloaded the trial of a conversion tool (DBConvert) and tried it. I just picked up a random tool, this tool doesn't convert procedures, functions and triggers (I don't think it is a limit of the trial since there is not an explicit reference to sp, sf and triggers in the link above). Anyway by trying that tool I had the message: "The DB cannot be converted succesfully because some FK names are too long." This is because in some tables I have FK whose description is 32 chars. Is this a real firebird limit or it is possible to overcome it somehow (of course renaming the FK is an extreme option because it is extra work)? Anyway how to convert a MS SQL DB fully to FIREBIRD? Is there a valid tool? Did someone succed in a conversion of non trivial databases?

    Read the article

  • Restricting logons during certain hours for certain users

    - by simonsabin
    Following a an email in a DL I decided to look at implementing a logon restriction system to prevent users from logging on at certain ties of the day. The poster had a solution but wanted to add auditing. I immediately thought of the My post on logging messages during a transaction because I new that part of the logon trigger functionality is that you rollback the connection. I therefore assumed you had to do the logging like I talk about in that post (otherwise the logging wouldn’t persist beyond...(read more)

    Read the article

  • Capturing index operations using a DDL trigger

    - by AaronBertrand
    Today on twitter the following question came up on the #sqlhelp hash tag, from DaveH0ward : Is there a DMV that can tell me the last time an index was rebuilt? SQL 2008 My initial response: I don't believe so, you'd have to be monitoring for that ... perhaps a DDL trigger capturing ALTER_INDEX? Then I remembered that the default trace in SQL Server ( as long as it is enabled ) will capture these events. My follow-up response: You can get it from the default trace, blog post forthcoming So here is...(read more)

    Read the article

  • Capturing index operations using a DDL trigger

    - by AaronBertrand
    Today on twitter the following question came up on the #sqlhelp hash tag, from DaveH0ward : Is there a DMV that can tell me the last time an index was rebuilt? SQL 2008 My initial response: I don't believe so, you'd have to be monitoring for that ... perhaps a DDL trigger capturing ALTER_INDEX? Then I remembered that the default trace in SQL Server ( as long as it is enabled ) will capture these events. My follow-up response: You can get it from the default trace, blog post forthcoming So here is...(read more)

    Read the article

  • Why updatepanel triggers another updatepanel?

    - by HasanGursoy
    I have two update panels at my ajax page. This is first time I'm using updatepanel and I don't know what is wrong. I think only btnFilter's Click event must trigger the second update panel's content but changing combo values (which also hides/unhides btnFilter button) makes second updatepanel change content (at least I see transferred data with firebug & second updatepanel blinks sometimes). Online here. <asp:UpdatePanel ID="upComparison" runat="server"> <ContentTemplate> Brand: <asp:DropDownList ID="ddlBrands" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlBrands_SelectedIndexChanged" AppendDataBoundItems="true"> <asp:ListItem Value="" Text="Please select a brand..." /> </asp:DropDownList> <asp:Panel ID="pModels" runat="server" Visible="false"> Model: <asp:DropDownList ID="ddlModels" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlModels_SelectedIndexChanged" /> </asp:Panel> <asp:Panel ID="pButton" runat="server" Visible="false"> <asp:UpdateProgress ID="upMain" runat="server" DisplayAfter="100"> <ProgressTemplate><img src="/Assets/Images/loader.gif" /> </ProgressTemplate> </asp:UpdateProgress> <asp:Button ID="btnFilter" runat="server" Text="Filter" OnClick="btnFilter_Click" /> </asp:Panel> </ContentTemplate> </asp:UpdatePanel> <asp:UpdatePanel ID="upList" runat="server"> <ContentTemplate> <asp:Repeater ID="rProducts" runat="server"> <ItemTemplate>some code here</ItemTemplate> </asp:Repeater> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="btnFilter" EventName="Click" /> </Triggers> </asp:UpdatePanel>

    Read the article

  • Managing mandatory fields with triggers

    - by okkesemin
    I would like to set mandatory field backgrounds are red and others are green. So I try to implement below. But I could not set ValueConstraint Nullable property with trigger. Could you help please ? <Window x:Class="TriggerGirilmesigerekenalanlar.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:y="http://infragistics.com/Editors" Title="Window1" Height="300" Width="300"> <Window.Resources> <Style TargetType="{x:Type y:XamTextEditor}"> <Style.Triggers> <Trigger Property="ValueConstraint" Value="{x:Null}"> <Trigger.Setters> <Setter Property="Background" Value="green"></Setter> </Trigger.Setters> </Trigger> <Trigger Property="y:ValueConstraint.Nullable" Value="false"> <Trigger.Setters> <Setter Property="Background" Value="red"></Setter> </Trigger.Setters> </Trigger> </Style.Triggers> </Style> </Window.Resources> <StackPanel> <y:XamTextEditor> <y:XamTextEditor.ValueConstraint> <y:ValueConstraint Nullable="False" ></y:ValueConstraint> </y:XamTextEditor.ValueConstraint> </y:XamTextEditor> <y:XamTextEditor></y:XamTextEditor> </StackPanel> </Window>

    Read the article

  • < key triggers sticky alt on Windows 7

    - by Xoundboy
    When using a code editor like Notepad++ or Eclipse I'm experiencing a rather annoying problem: each time I type the < key the keyboard latches into some unexpected mode whereby the subsequent keypress behaves as if the alt key were being held down. The only way to return to normal mode is to hit the escape key twice immediately after I type a < character. The keyboard is a Microsoft Comfort Curve 2000 and the OS is Windows 7. Does anyone have any idea what I should do to stop this behaviour? Thanks

    Read the article

  • WPF performance : Converters vs. Triggers

    - by Joachim Kerschbaumer
    hi there, i´m currently facing a problem where i have to set properties on a bunch of framework elements depending on some other properties. i wonder how triggers and converters compare when it comes to performance. Especially MultiTriggers and IMultiValueConverters. Is there any difference? google wasn't helpful so i thought maybe some of the guys over here at SO could bring in some light. thanks, j.

    Read the article

  • Triggers in NHibernate

    - by Felipe
    Hi everybody, I'd like to know if is there something like a Trigger (of databases) in NHibernate that I can use per entity ? I'd like to make a history of each record, and with triggers I can compare the old value and new value of each property and generate a register of history. I've heard about Audit in NHibernate, but it's for all entities, if there isn't another way... how Can I separete a block per entity ? Thanks

    Read the article

  • Extended events vs Triggers Sql server 2008

    - by Prashant
    I have a requirement to copy whatever data is getting inserted or updated to a log table to show who updated and when. I was thinking of using triggers for the same. The reason being the insert needed not be only stored procedure but can also be packages. Can I use extended events for the same ?.

    Read the article

  • Trigger for ComboBox in Silverlight

    - by Budda
    Is there any possibility to display selected item of the ComboBox (after popup closing) in a way that is different from its displaying in DropDown List (There are players number and name in the dropdown list, but after list closing I want to see only its number). How can I change a background for the player with some Flag? As far as I know, all of that can be done with triggers, but are they supported in Silverlight 4, VS2010, Silverlight Toolkit 4? In my case the following code <ComboBox ItemsSource="{Binding PlayersAll}" SelectedItem="{Binding Path=SelectedPlayer, Mode=TwoWay}" > <ComboBox.ItemTemplate> <DataTemplate> <ToolkitControls:WrapPanel Orientation="Horizontal"> <TextBlock Text="{Binding TeamNumber}"/> <TextBlock Text=" - "/> <TextBlock Text="{Binding ShortName}"/> </ToolkitControls:WrapPanel> <DataTemplate.Triggers> <Trigger Property="HasError" Value="True"> <Setter Property="Background" TargetName="FlagSet" Value="Red"/> </Trigger> </DataTemplate.Triggers> </DataTemplate> </ComboBox.ItemTemplate> </ComboBox> gives an error: The property 'Triggers' does not exist on the type 'DataTemplate' in the XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation' what is wrong here? Here are my namespaces: xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" xmlns:ToolkitControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"

    Read the article

  • jQuery Hover Problem - Hover Triggers on Mouse Move

    - by majman
    For reference: http://www.favsav.com/-public You'll notice that if you hover over a list item, the meta data slides up. If you leave your mouse still on top, and then move a smidgen to the left or right, it triggers again. There's some other silliness going on if you move around The code is pretty simple: $('li.post').hover(function(){ $(this).find('.meta').slideDown('fast'); }, function(){ $(this).find('.meta').slideUp('fast'); }) Any idea why things are behaving like this? This seems to only be happening in Firefox (i'm using 3.5.5 on OSX) UPDATE After restarting Firefox, all is well! Thanks for the input!

    Read the article

  • Actionscript 2.0 mx.managers.CreatePopUp dialog triggers onRollOver for events underneath it

    - by user317112
    All, On the main stage I have a button that is highlighted on rollover. I am using mx.managers.CreatePopUp to create a dialog box that pops up and takes user information. When the dialog box appears above the button, mousing over the dialog box triggers the highlight for the button beneath it. Can you provide some suggestions as to what the issue might be caused by? (I am fairly new to Flash so any suggestions would be helpful. Just looking for things to experiment with to get the correct behavior.) Other info that might be helpful: I've noticed that when I create a modal version of the dialog box, this behavior does not occur. Dismissing the modal dialog disables the entire stage. Fixing this issue would also solve my problem, but I've been unsuccessful thus far. Thanks in advance.

    Read the article

  • VEMap Pan triggers VEMap.onclick

    - by Jason
    I'm using the Virtual Earth (or Bing!...) SDK and need to attach an event when someone clicks the map. Unfortunately panning the map also triggers the onclick event. Does anyone know of a work around? function GetMap(){ map = new VEMap('dvMap'); map.LoadMap(new VELatLong(35.576916524038616,-80.9410858154297), 11, 'h',false); mapIsInit = true; map.AttachEvent('onclick', MapClick); } function MapClick(e){ var clickPnt = map.PixelToLatLong(new VEPixel(e.mapX,e.mapY)); Message('Map X: ' + clickPnt.Longitude + '\nMap Y: ' + clickPnt.Latitude + '\nZoom: ' + e.zoomLevel); }

    Read the article

  • How to get the right order for creation of stored procedure, user-defined functions and triggers

    - by PeeWee2201
    I read that object dependencies have been improved in SQL server 2008. I have a rather complex database schema containing stored procedure, user-defined functions, triggers. Can anybody give me a query that would return the right order of creation of those items based on their dependencies ? I read here that there are tools that can do the job, but I am looking for something scriptable. Also, they often give the dependencies of one object and I would like a database-wide solution. Thank you.

    Read the article

  • TeamCity build triggers don't automatically run

    - by Phil.Wheeler
    I've been playing around with and learning a bit about TeamCity and have the server correctly set up with my .Net MVC project committed in Subversion successfully and build configurations and triggers sorted to kick off when any changes are committed to the repository. TeamCity polls on its default time period and is picking up that changes have been committed, but it is adding these to the queue without actually ever running them. I have to manually click the "Run" button to kick them off. What setting do I need to change in order to ensure that any new changes are automatically run?

    Read the article

  • How to SET tiggers 0 in MySQL?

    - by Grijesh Chauhan
    In my MySQL database I have some Triggers ON DELETE and ON INSERT. Some time I need to switched-off my some Triggers, And I have to DROP e.g. DROP TRIGGER IF EXISTS hostgroup_before_insert // and reinstall. Is there any shortcut to SET triggers hostgroup_before_insert = 0 like we have for foreign keys mysql> SELECT version(); +-------------------------+ | version() | +-------------------------+ | 5.1.61-0ubuntu0.10.10.1 | +-------------------------+ 1 row in set (0.00 sec) I am new learner and I could not find regarding this on web.

    Read the article

  • SQL Triggers and when or when not to use them.

    - by John Mitchell
    When I was originally learning about SQL I was always told, only use triggers if you really need to and opt to use stored procedures instead if possible. Now unfortunately at the time (a good few years ago) I wasn't as curious and caring about fundamentals as I am now so never did ask to the reason why. What's the communities opinion in this? Is it just someone's personal preference, or should triggers be avoided (just like cursors) unless there is a good reason for them.

    Read the article

  • Return pre-UPDATE column values in PostgreSQL without using triggers, functions or other "magic"

    - by Python Larry
    I have a related question, but this is another part of MY puzzle. I would like to get the OLD VALUE of a Column from a Row that was UPDATEd... WITHOUT using Triggers (nor Stored Procedures, nor any other extra, non-SQL/-query entities). The query I have is like this: UPDATE my_table SET processing_by = our_id_info -- unique to this instance WHERE trans_nbr IN ( SELECT trans_nbr FROM my_table GROUP BY trans_nbr HAVING COUNT(trans_nbr) > 1 LIMIT our_limit_to_have_single_process_grab ) RETURNING row_id If I could do "FOR UPDATE ON my_table" at the end of the subquery, that'd be devine (and fix my other question/problem). But, that won't work: can't have this AND a "GROUP BY" (which is necessary for figuring out the COUNT of trans_nbr's). Then I could just take those trans_nbr's and do a query first to get the (soon-to-be-) former processing_by values. I've tried doing like: UPDATE my_table SET processing_by = our_id_info -- unique to this instance FROM my_table old_my_table JOIN ( SELECT trans_nbr FROM my_table GROUP BY trans_nbr HAVING COUNT(trans_nbr) > 1 LIMIT our_limit_to_have_single_process_grab ) sub_my_table ON old_my_table.trans_nbr = sub_my_table.trans_nbr WHERE my_table.trans_nbr = sub_my_table.trans_nbr AND my_table.processing_by = old_my_table.processing_by RETURNING my_table.row_id, my_table.processing_by, old_my_table.processing_by But that can't work; "old_my_table" is not viewable outside of the join; the RETURNING clause is blind to it. I've long since lost count of all the attempts I've made; I have been researching this for literally hours. If I could just find a bullet-proof way to lock the rows in my subquery - and ONLY those rows, and WHEN the subquery happens - all the concurrency issues I'm trying to avoid disappear... UPDATE: [WIPES EGG OFF FACE] Okay, so I had a typo in the non-generic code of the above that I wrote "doesn't work"; it does... thanks to Erwin Brandstetter, below, who stated it would, I re-did it (after a night's sleep, refreshed eyes, and a banana for bfast). Since it took me so long/hard to find this sort of solution, perhaps my embarrassment is worth it? At least this is on SO for posterity now... : What I now have (that works) is like this: UPDATE my_table SET processing_by = our_id_info -- unique to this instance FROM my_table AS old_my_table WHERE trans_nbr IN ( SELECT trans_nbr FROM my_table GROUP BY trans_nbr HAVING COUNT(*) > 1 LIMIT our_limit_to_have_single_process_grab ) AND my_table.row_id = old_my_table.row_id RETURNING my_table.row_id, my_table.processing_by, old_my_table.processing_by AS old_processing_by The COUNT(*) is per a suggestion from Flimzy in a comment on my other (linked above) question. (I was more specific than necessary. [In this instance.])

    Read the article

  • WPF trigger on datagrid to hide/show columns according to bindings

    - by Renan
    I have a data grid like this: <DataGrid AutoGenerateColumns="False" CanUserDeleteRows="True" HorizontalScrollBarVisibility="Hidden" Margin="10,10,10,10" VerticalScrollBarVisibility="Visible" CanUserAddRows="False" ItemsSource="{Binding ListGestores}" ToolTip="Selecione uma linha e pressione DELETE para remover uma unidade."> <DataGrid.Columns> <DataGridTextColumn Binding="{Binding TB_UNIDADE.DS_NOME_UNIDADE}" CanUserResize="False" Header="Setor" IsReadOnly="True" x:Name=""/> <DataGridTextColumn Binding="{Binding TB_UNIDADE.TB_UNIDADE2.DS_NOME_UNIDADE}" CanUserResize="False" Header="Unidade" IsReadOnly="True" x:Name=""/> <DataGridTextColumn Binding="{Binding TB_CONTATOS.DS_NOME}" CanUserResize="False" Header="Gestor" IsReadOnly="True" /> </DataGrid.Columns> </DataGrid> The problem is that i need to verify if the 2 column binding is null, and if it is null, i need to Hide it, and Change the Header of the column 1. I know that i can do that with Triggers, but how exactly??? I started with: <DataGrid.Triggers> <DataTrigger Binding="{Binding TB_UNIDADE.TB_UNIDADE2}" Value="{x:Null}"> <Setter Property="" Value="" /> </DataTrigger> </DataGrid.Triggers> But i don't know what setter or whatever to put ! Help me =]

    Read the article

  • WPF combobox loses Aero theme when using a style trigger

    - by Greg R
    I am using style triggers to change combo box to texbox if it's readonly, but for some reason when I apply the style, it cause the combobox theme to change from Aero to Windows Classic (the theme I currently have in use on my PC). Can I avoid this somehow? Here is my code: <ComboBox ItemsSource="{Binding Source={StaticResource AllCountries}}" SelectedValue="{Binding OrderInfoVm.BillingCountry}" DisplayMemberPath="Value" SelectedValuePath="Key" IsReadOnly="{Binding ReadOnlyMode}" Style="{StaticResource EditableDropDown}" /> <Style x:Key="EditableDropDown" TargetType="ComboBox"> <Style.Triggers> <Trigger Property="IsReadOnly" Value="True"> <Setter Property="SelectedValuePath" Value="Content" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="ComboBox"> <TextBox Text="{TemplateBinding SelectedValue, Converter={StaticResource StringCaseConverter}}" BorderThickness="0" Background="Transparent" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" FontFamily="{TemplateBinding FontFamily}" Width="{TemplateBinding Width}" TextWrapping="Wrap"/> </ControlTemplate> </Setter.Value> </Setter> </Trigger> </Style.Triggers> </Style>

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >