Search Results

Search found 2670 results on 107 pages for 'trigger'.

Page 7/107 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Would like help with LOGON Trigger

    - by Risho
    I've created a logon trigger in MS SQL that needs to check dm_exec_sessions for a login. This login is the user listed in the connection string and has owner right to the database. If the login is verified, I need it to update a specific table and send an email. So far I've done just the following piece and it disabled my web site. The error I get is: "Logon failed for login 'dev' due to trigger execution. Changed database context to 'mydatabase'. Changed language setting to us_english." Any idea what I did wrong? Thanks, Risho CREATE TRIGGER TDY_Assets_Notification ON ALL SERVER WITH EXECUTE AS 'dev' FOR LOGON AS BEGIN IF ORIGINAL_LOGIN()='dev' AND (SELECT COUNT(*) FROM sys.dm_exec_sessions WHERE is_user_process = 1 AND original_login_name = 'dev') > 1 UPDATE Assets_TDY SET Suspense = 1, Warning = 1 WHERE (Date_Returned IS NULL) AND (GETDATE() >= DATEADD(day, 3, Date_Return)) END

    Read the article

  • How to apply a update after an inser or update POSTGRESQL Trigger

    - by user3718906
    How to apply an update after an insert or update in POSTGRESQL; I have got a table which has a field lastupdate; I want that field to be set up whenever the row is updated or when it was inserted. I tried this trigger, but It is not working! HELP!! CREATE OR REPLACE FUNCTION fn_update_profile() RETURNS TRIGGER AS $update_profile$ BEGIN IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE' ) THEN UPDATE profile SET lastupdate=now() where oid=OLD.oid; RETURN NULL; ELSEIF (TG_OP = 'DELETE') THEN RETURN NULL; END IF; RETURN NULL; -- result is ignored since this is an AFTER trigger END; $update_profile$ LANGUAGE plpgsql;

    Read the article

  • Show certain InfoWindow in Google Map API V3

    - by pash
    Hello. I wrote the following code to display markers. There are 2 buttons which show Next or Previous Infowindow for markers. But problem is that InfoWindows are not shown using google.maps.event.trigger Can someone help me with this problem. Thank you. Here is code: <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <title>Google Maps JavaScript API v3 Example: Common Loader</title> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript"> var infowindow; var map; var bounds; var markers = []; var markerIndex=0; function initialize() { var myLatlng = new google.maps.LatLng(41.051407, 28.991134); var myOptions = { zoom: 5, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); markers = document.getElementsByTagName("marker"); for (var i = 0; i < markers.length; i++) { var latlng = new google.maps.LatLng(parseFloat(markers[i].getAttribute("lat")), parseFloat(markers[i].getAttribute("lng"))); var marker = createMarker(markers[i].getAttribute("name"), latlng, markers[i].getAttribute("phone"), markers[i].getAttribute("distance")); } rebound(map); } function createMarker(name, latlng, phone, distance) { var marker = new google.maps.Marker({position: latlng, map: map}); var myHtml = "<table style='width:100%;'><tr><td><b>" + name + "</b></td></tr><tr><td>" + phone + "</td></tr><tr><td align='right'>" + distance + "</td></tr></table>"; google.maps.event.addListener(marker, "click", function() { if (infowindow) infowindow.close(); infowindow = new google.maps.InfoWindow({content: myHtml}); infowindow.open(map, marker); }); return marker; } function rebound(mymap){ bounds = new google.maps.LatLngBounds(); for (var i = 0; i < markers.length; i++) { bounds.extend(new google.maps.LatLng(parseFloat(markers[i].getAttribute("lat")),parseFloat(markers[i].getAttribute("lng")))); } mymap.fitBounds(bounds); } function showNextInfo() { if(markerIndex<markers.length-1) markerIndex++; else markerIndex = 0 ; alert(markers[markerIndex].getAttribute('name')); google.maps.event.trigger(markers[markerIndex],"click"); } function showPrevInfo() { if(markerIndex>0) markerIndex--; else markerIndex = markers.length-1 ; google.maps.event.trigger(markers[markerIndex],'click'); } </script> </head> <body onload="initialize()"> <div id="map_canvas" style="width:400px; height:300px"></div> <markers> <marker name='Name1' lat='41.051407' lng='28.991134' phone='+902121234561' distance=''/> <marker name='Name2' lat='40.858746' lng='29.121666' phone='+902121234562' distance=''/> <marker name='Name3' lat='41.014604' lng='28.972256' phone='+902121234562' distance=''/> <marker name='Name4' lat='41.012386' lng='26.978350' phone='+902121234562' distance=''/> </markers> <input type="button" onclick="showPrevInfo()" value="prev">&nbsp;<input type="button" onclick="showNextInfo()" value="next"> </body> </html>

    Read the article

  • importing a mysqldump file does not import triggers due to some permission problems

    - by user51792
    Hello, Whenever I try to import a mysqldump export on another server, the triggers are never created, and if I remember correctly, I get an error messages that super user permission is required. IF I remove the definer it usually works but if there is a way I would prefer not having to edit the sql file. When I just simply copy over the mdi, mdy and frm files everything works perfectly. How could I import a mysqldump file so that triggers are created as well?

    Read the article

  • Trigger Code on a table in my ERP Database

    - by David Stein
    My ERP Vendor has the following trigger on a table: SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TRIGGER [dbo].[SOItem_DeleteCheck] ON [dbo].[soitem] FOR DELETE AS BEGIN DECLARE @RecCnt int, @LogInfo varchar(256) SET @RecCnt = (SELECT COUNT(*) FROM deleted) IF @RecCnt > 150 BEGIN RAISERROR (54010, 18, 1, 'SOItem') WITH LOG ROLLBACK TRANSACTION END SET @LogInfo = 'Deleting ' + LTRIM(STR(@RecCnt)) + ' Rows From SOItem' EXEC LogDeletes @LogInfo END GO This seems very inefficient to me. Doesn't select count(*) take longer than Count(specific field)?

    Read the article

  • Converting Plsql Trigger to Tsql

    - by mcb
    Hi, I am not good at tsql.How can does following trigger in tsql?For each doesnt work in tsql. CREATE OR REPLACE TRIGGER DSS.TRG_DEPO_STOK_IZLEME BEFORE INSERT OR UPDATE ON DSS.CR_DEPO_STOK FOR EACH ROW BEGIN INSERT INTO CR_DEPO_STOK_IZLEME (ID_DEPO_STOK_IZLEME , ID_DEPO_STOK , MT_MIKTAR_ESKI , MT_MIKTAR_YENI , EKLEME_TARIHI ) VALUES (SEQ_ID_DEPO_STOK_IZLEME.NEXTVAL , :NEW.ID_DEPO_STOK , :OLD.MT_MIKTAR , :NEW.MT_MIKTAR , SYSDATE ); EXCEPTION WHEN OTHERS THEN NULL; END;

    Read the article

  • Multiple rows update trigger

    - by sony
    If I have a statement that updates multiple rows, only the trigger will fire only on the first or last row that is being updated (not sure which one). I need to make a trigger that fires for ALL the records that are being updated into a particular table

    Read the article

  • Sharepoint Workflow doesn't trigger after created/edited tickets

    - by Brad Johnson
    I have a workflow created in Sharepoint designer that works fine when manually triggered. I want it to trigger when a new ticket is created and when an existing ticket is edited. I have tried everything, but it makes no sense that it works when manually triggered, but does not appear to trigger when tickets are created/modified. Any help would be appreciated.

    Read the article

  • Mysql trigger to block a row delete

    - by rtacconi
    I wuold like to define a trigger to block the deletion of the row with ID 2 of the configuration table, you might guess why, I am trying something like that: CREATE TRIGGER do_not_delete_configuration_1 BEFORE DELETE ON configuration FOR EACH ROW BEGIN IF (OLD.configurationid != 1) THEN DELETE FROM configuration WHERE configuration.configuration=OLD.configurationid; END IF; END; | without a positive result.

    Read the article

  • how to trigger a MVC application?

    - by ajsie
    how do you trigger a MVC application. im only used to use procedural coding. since everything are classes, how do i trigger the first method, where should this method be put, and what should the class holding this starter method be called? thanks

    Read the article

  • How to get SQL Profiler to monitor trigger execution

    - by firedfly
    I have a trace setup for SQL Server Profiler to monitor SQL that is executed on a database. I recently discovered that trigger execution is not included in the trace. After looking through available events for a trace, I do not see any that look like they would include trigger execution. Does anyone know how to setup a trace to monitor the execution of triggers?

    Read the article

  • Trigger events from Firefox browser extension?

    - by Alex
    Hello, I want to trigger events from a firefox extension, specifically click events. I've tried jQuery's .click() as well as the whole: var evt = document.createEvent("HTMLEvents"); evt.initEvent("click", true, false ); toClick[0].dispatchEvent(evt); This is not working for me, and I was wondering if this is even possible? (to trigger events from a firefox extension)? If so, how does one do it?

    Read the article

  • Jquery: how to trigger td a when tr is clicked

    - by Poku
    Hey, I have a table where the first td in the trs contains a link. I want this anchor to be triggered (clicked) no matter where i click in the containing tr. I have read and tried alot of recents post and suggentions on this topic but i can't get this to work. I tried the trigger() and triggerHandle() functions, but it does not trigger the anchor click that i want. There must be others who have had the need to trigger a anchor click when a tr is clicked, so that the user doesn't have to click the tds anchor link. It sure is a nice UI feature if its possible? Here is the code i have tried: <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <script type="text/javascript" src="javascripts/jquery-1.4.2.js"></script> <script type="text/javascript" charset="utf-8"> /* Initialise the table with the required column sorting data types */ jQuery(document).ready(function () { jQuery("#rowClick tr").click(function (e) { jQuery("#clickevent", this).trigger("click"); }); }); </script> </head> <body id="dt_example"> <table id="rowClick"> <thead> <tr> <th style="width: 30px">id</th> <th style="width: 200px">navn</th> </tr> </thead> <tbody> <tr> <td><a href="datatabletext.asp?test=1" id="clickevent">1</a></td> <td>Jesper</td> </tr> <tr> <td><a href="datatabletext.asp?test=2" id="clickevent">2</a></td> <td>Bjarne</td> </tr> <tr> <td><a href="datatabletext.asp?test=3" id="clickevent">3</a></td> <td>Søren</td> </tr> </tbody> </table> </body>

    Read the article

  • How to update a single table using trigger in MS SQL 2008

    - by Yakob-Jack
    I have a table PeroidicDeduction and the fields are ID(auto-increment),TotalDeduction(e.g.it can be loan),Paid(on which the deduction for each month),RemainingAmount, What I want is when every time I insert or update the table---RemainingAmount will get the value of TotalDeduction-SUM(Paid)....and writ the following trigger...but dosen't work for me CREATE TRIGGER dbo.UpdatePD ON PeroidicDedcution AFTER INSERT,UPDATE AS BEGIN UPDATE PeroidicDedcution SET REmaininAmoubnt=(SELECT TotalDeduction-(SELECT SUM(Paid) FROM PeroidicDeduction) FROM PeroidicDeduction) END NOTE: it is on a Single table

    Read the article

  • jQuery trigger extra paramter

    - by fire
    According to the jQuery manual you can send extra parameters (as an array) when calling a trigger. I am using this at the moment: $('#page0').trigger('click', [true]); How would I pick up whether the paramter has come through or not when using this? $('ul.pages li a').click(function() { // Do stuff if true has been passed as an extra parameter });

    Read the article

  • Empty String Check in Trigger

    - by Asim Sajjad
    How can I check the empty string in triggers <Trigger Property="Source" SourceName="ControlName" Value=""> <Setter Property="Height" Value="0" TargetName="ControlName" /> </Trigger> I have set the Height of the Control to 0 if the source of the imageControl is empty stirnr or not set? How can I do it, Basically If the image is not set then I want to hide the image control in the template. thanks in advance.

    Read the article

  • Eclipselink and update trigger on multiple access to the database

    - by Raven
    Hi, in my project I have a database which many clients connect to. Concurrent access and writing works well. The problem now is not to reload the data every second from the database to always have the current status of the data. Does Eclipselink provide a trigger mechanism on (automatically?) reload the data if the database is changed? How would one use this trigger? Thanks!

    Read the article

  • Query scope within a table trigger in an Oracle database

    - by sisslack
    I'm been trying to write a table trigger the queries another table that is outside the schema where the trigger will reside. Is this possible? It seems like I have no problem querying tables in my schema but I get: Error: ORA-00942: table or view does not exist when trying trying to query tables outside my schema. The documentation seems to elude to this notion, but it's not 100% clear to me.

    Read the article

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