Search Results

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

Page 11/60 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • how to activate trigger after all the bulk insert(s) in mysql

    - by JPro
    I am using mysql and there are bulk inserts that goes on to my table. My doubt is if I create a trigger specifying after insert, then the trigger will get activated for every insert after, which I do not want to happen. Is there any way to activate a trigger after all the bulk inserts are completed? Any advice? Thanks.

    Read the article

  • How to compile and run H2 TriggerSample

    - by user1877838
    I copied TriggerSample.java to this directory. Then: javac -cp h2-1.3.168.jar TriggerSample.java creates TriggerSample$MyTrigger.class ... and ... TriggerSample.class Then: java TriggerSample says: Exception in thread "main" java.lang.NoClassDefFoundError: TriggerSample (wrong name: org/h2/samples/TriggerSample) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) also no go with: java org.h2.samples.TriggerSample java org/h2/samples/TriggerSample How exactly to run that example from the command line?

    Read the article

  • Pretty photo ibox doesn't trigger after appending new element in HTML

    - by user1469133
    I'm trying to get prettyPhoto or some other jquery plugin to work after I append new element to the HTML page: to be specific I have this: $(document).ready(function() { $(window).scroll(function() { if($(window).scroll) { $('div#loadMoreComments').show(); $.ajax({ type : "POST", url : "getvariables.php", dataType: "json", data : { webid: $(".posts:last").attr('id') } }).done(function( msg ) { jQuery.each(msg , function(index, value){ $("#posts").append(value); }); // $("#posts").append(msg); $('div#loadmore').hide(); }); } }); }); Then I have something like this that has to trigger the popup <p><a href="#inline-1" rel="ibox">Trigger popup.</a></p> <div id="inline-1" style="display: none;"> Content to show up after the link is triggered </div> Will appreciate any help over this. Thanks.

    Read the article

  • is it possible to make one click fires two events or more by javascript?

    - by NewInAlbert
    I am currently making a temporary download page for website visitor. The page includes a form, after the visitor fills the form up, the site will take them to the pdf download page. In the download page, there are some pdf files download links (I am just using a tag.). However, i wanna make a onclick event to those links, once they have been clicked, the page will refresh automatically or redirect to other pages. <a href="/file.pdf" onClick="window.location.reload()">The File</a> I have tried the jquery way as well. <a href="/file.pdf" id="FileDownload">The File</a> <script> $("#FileDownload").click(function(){ location.reload(); }); </script> But all the them are not working. Do you masters have any good ideas about this, many thanks. P.S. What if I wanna add a countdown after a file is being started download, and then do page reload when countdown finishes. Looks like have asked several questions... Thanks a ton in advance.

    Read the article

  • WTF why does this SQL work in VS but not in CODE?

    - by acidzombie24
    The line cmd.ExecuteNonQuery(); cmd.CommandText CREATE TRIGGER subscription_trig_0 ON subscription AFTER INSERT AS UPDATE user_data SET msg_count=msg_count+1 FROM user_data JOIN INSERTED ON user_data.id = INSERTED.recipient; The exception: Incorrect syntax near the keyword 'TRIGGER'. Then using VS 2010, connected to the very same file (a mdf file) i run the query above and i get a success message. WTF!

    Read the article

  • MySQL Update Trigger with Conditions

    - by user1760656
    I have a PHP app that inserts 'Pass', 'Fail' or 'NA' into fields TEST1, TEST2, TEST3... through TEST15. I have a field called OVERALL that needs to be automatically updated with 'FAIL' if any of the TEST1-TEST15 fields contains 'Fail'. I'm pretty sure I need to use a trigger containing the update statement and either CASE or IF, but I haven't been able to nail down the exact syntax. Can anyone please help a MySQL noob? I'm using MySQL Server version: 5.1.63-0+squeeze1 (Debian).

    Read the article

  • Oracle Reports SELECT INTO Not Selecting

    - by Kevin Cruz
    I'm working on a Report in Oracle Reports Builder, and having issues with my AFTERPFORM trigger. When viewing the report, it seems like the year is being processed properly, while the period and subperiod are using their initial values. I'm confused because they are the exact same select statement, but are not working as intended. Any help would be greatly appreciated! function AfterPForm return boolean is v_subpdenddt_user date; v_subpdenddt_max date; v_rowcount integer; begin select value into year from wos_report_param where parameter = 'year' and sequence_num = :sequencenum; select value into period from wos_report_param where parameter = 'period' and sequence_num = :sequencenum; select value into user_subpd from wos_report_param where parameter = 'subpd' and sequence_num = :sequencenum;

    Read the article

  • Why does this SQL work in VS but not in code?

    - by acidzombie24
    The line cmd.ExecuteNonQuery(); cmd.CommandText CREATE TRIGGER subscription_trig_0 ON subscription AFTER INSERT AS UPDATE user_data SET msg_count = msg_count + 1 FROM user_data JOIN INSERTED ON user_data.id = INSERTED.recipient; The exception: Incorrect syntax near the keyword 'TRIGGER'. Then using VS 2010, connected to the very same file (a mdf file) i run the query above and i get a success message.

    Read the article

  • problem in creating a trigger

    - by mohanish
    Hi Bill I am facing a problem in creating a trigger and i am not sure why this is erroring out.can you please help me. I have described the problem in this link below http://forums.mysql.com/read.php?99,365942,365942#msg-365942.

    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

  • How do I execute an action in drupal after each time a node is saved?

    - by ford
    I'm developing an Action in Drupal which is supposed to activate after saving a node, exporting content to XML (which includes data from the node that was just saved), using the "Trigger: After saving an updated post" trigger. Unfortunately this action actually happens right before the information from the recently saved post is saved to the database. ie. when looking at the XML later, I find that the most recent change I made was not included. Saving after editing a different node will restore the previously missing data. How can I get my action to fire after the saving process is complete?

    Read the article

  • sql server 2008

    - by tom
    Hi, I am trying to create a trigger for a cinema database. I need it to update once a rating is added for a movie showing the text "rating added". The table name is movie_ratings the primary key is = movie_rating I am not really sure how to do it, I have looked online but still are not too sure. I was wondering if anyone could help. Thanks

    Read the article

  • How to use a self-signed SSL certificate when developing with Trigger.io?

    - by user610345
    Our backend is in rails, and for several reasons the development environment has to be run with rails using a self-signed SSL certificate. This works fine on the desktop after manually trusting the certificate. Using Trigger.io, we're developing a mobile application targeting iOS from the same backend. It would be ideal for us to be able to run the rails server with SSL (so we can compare the browser output) and still have the iOS simulator connect properly without complaining about invalid certs. Production is using a proper ssl-cert, but what's the best way to set up the simulator?

    Read the article

  • How to emulate a BEFORE DELETE trigger in SQL Server 2005

    - by Mark
    Let's say I have three tables, [ONE], [ONE_TWO], and [TWO]. [ONE_TWO] is a many-to-many join table with only [ONE_ID and [TWO_ID] columns. There are foreign keys set up to link [ONE] to [ONE_TWO] and [TWO] to [ONE_TWO]. The FKs use the ON DELETE CASCADE option so that if either a [ONE] or [TWO] record is deleted, the associated [ONE_TWO] records will be automatically deleted as well. I want to have a trigger on the [TWO] table such that when a [TWO] record is deleted, it executes a stored procedure that takes a [ONE_ID] as a parameter, passing the [ONE_ID] values that were linked to the [TWO_ID] before the delete occurred: DECLARE @Statement NVARCHAR(max) SET @Statement = '' SELECT @Statement = @Statement + N'EXEC [MyProc] ''' + CAST([one_two].[one_id] AS VARCHAR(36)) + '''; ' FROM deleted JOIN [one_two] ON deleted.[two_id] = [one_two].[two_id] EXEC (@Statement) Clearly, I need a BEFORE DELETE trigger, but there is no such thing in SQL Server 2005. I can't use an INSTEAD OF trigger because of the cascading FK. I get the impression that if I use a FOR DELETE trigger, when I join [deleted] to [ONE_TWO] to find the list of [ONE_ID] values, the FK cascade will have already deleted the associated [ONE_TWO] records so I will never find any [ONE_ID] values. Is this true? If so, how can I achieve my objective? I'm thinking that I'd need to change the FK joining [TWO] to [ONE_TWO] to not use cascades and to do the delete from [ONE_TWO] manually in the trigger just before I manually delete the [TWO] records. But I'd rather not go through all that if there is a simpler way.

    Read the article

  • Create a trigger that updates a column on one table when a column in another table is updated

    - by GigaPr
    Hi, i have two tables Order(id, date, note) and Delivery(Id, Note, Date) I want to create a trigger that updates the date in Delivery when the date is updated in Order. I was thinking to do something like CREATE OR REPLACE TRIGGER your_trigger_name BEFORE UPDATE ON Order DECLARE BEGIN UPDATE Delivery set date = ??? where id = ??? END; How do I get the date and row id? thanks

    Read the article

  • Oracle database on trigger fail rollback

    - by GigaPr
    Hi I want to create a trigger that execute on update of a table. in particular on update of a table i want to update another table via a trigger but if the trigger fails (REFERENTIAL INTEGRITY-- ENTITY INTEGRITY) i do not want to execute the update anymore. Any suggestion on how to perform this? Is it better to use a trigger or do it anagrammatically via a stored procedure? Thanks

    Read the article

  • trigger execution against condition satisfaction

    - by maheshasoni
    I have created this trigger which should give a error, whenever the value of new rctmemenrolno of table-receipts1 is matched with the memenrolno of table- memmast, but it is giving error in both condition(it is matched or not matched). kindly help me. CREATE OR REPLACE TRIGGER HDD_CABLE.trg_rctenrolno before insert ON HDD_CABLE.RECEIPTS1 for each row declare v_enrolno varchar2(9); cursor c1 is select memenrolno from memmast; begin open c1; fetch c1 into v_enrolno; LOOP If :new.rctmemenrolno<>v_enrolno then raise_application_error(-20186,'PLEASE ENTER CORRECT ENROLLMENT NO'); close c1; end if; END LOOP; end;

    Read the article

  • Problems with mysql syntax

    - by user368453
    Hello everyone !! I´m trying to create a trigger on MySQL but I´m having a sintaxe problem, which I was not able to find. If someone more experient could help me it would be great (it´s the first time I use MySQL!)... The reason why I´m creating this trigger is for deleting all the orphan "labels", which has a many-to-many relation with "service_descriptor" (this two entities are linked by service_labels). The code I have is: CREATE TRIGGER trg_delete_orphan_label AFTER DELETE FOR EACH ROW ON restdb.service_labels DELETE FROM restdb.labels WHERE EXISTS (SELECT * FROM old D LEFT_JOIN restdb.service_labels SL ON SL.id_label = D.id_label AND D.id_service = SL.id_service WHERE SL.id_label IS NULL restdb.labels.id = D.SL.id_label ); Thanks in advance !

    Read the article

  • How to automatically reflect the new Updates (on Database) to User Pages

    - by user296436
    I am trying to create a new Notice Alert using PHP and Javascript. Suppose that a 100 users are currently logged into to the Online Notice Board Application and any One user posts a new notice. I want an immediate alert signal on all the users screen. I know, that the simplest way of doing it is to constantly Ping the server but I don't want to do it as it will slow down the server. Moreover, I am on a shared host. So I don't have access to any Socket Port. That means, I cannot establish any direct Socket Communication Channel from the Server to the User Machine. Can any one suggest me some other solution to this kind of problems???

    Read the article

  • SQL Trigger Need to set x from a value

    - by Eric
    Im stuck on a the type of trigger needed to for this constraint. I will have a price and a commission. The price determines the commission amount, < 100 - 4%, < 200 - 5% etc. My idea. the database contains a separate table that will hold 4 price values , 101, 201, 401, 601, with their own matching comission %, this will be called PC. When i create a property listing i want to calculate the commission they earn depending on the price entered. on insert, i need to check the new.price and compare it to the prices in PC. Once new.price is less than the price tuple, i set the price to that commission value create or replace TRIGGER findCommission BEFORE INSERT OR UPDATE ON HASLISTING FOR each ROW BEGIN IF (:NEW.ASKING_PRICE < 100001) THEN :NEW.COMMISSION = 6.0; END IF; IF (:NEW.ASKING_PRICE < 250001) THEN :NEW.COMMISSION = 5.5; END IF; IF (:NEW.ASKING_PRICE < 1000001) THEN :NEW.COMMISSION = 5.0; END IF; IF (:NEW.ASKING_PRICE > 1000000) THEN :NEW.COMMISSION = 4.0; END IF; END;

    Read the article

  • Error when I try to installth desktop integration features for Openoffice

    - by PENG TENG
    peng@peng-ThinkPad-SL410:~$ cd '/home/peng/Downloads/en-US/DEBS/desktop-integration' peng@peng-ThinkPad-SL410:~/Downloads/en-US/DEBS/desktop-integration$ sudo dpkg -i *.deb (Reading database ... 357248 files and directories currently installed.) Unpacking openoffice.org-debian-menus (from openoffice.org3.4-debian-menus_3.4-9593_all.deb) ... dpkg: error processing openoffice.org3.4-debian-menus_3.4-9593_all.deb (--install): trying to overwrite '/usr/bin/soffice', which is also in package libreoffice-common 1:3.6.2~rc2-0ubuntu3 /usr/bin/gtk-update-icon-cache gtk-update-icon-cache: Cache file created successfully. /usr/bin/gtk-update-icon-cache gtk-update-icon-cache: Cache file created successfully. Processing triggers for menu ... Processing triggers for hicolor-icon-theme ... Processing triggers for gnome-icon-theme ... Processing triggers for shared-mime-info ... Unknown media type in type 'all/all' Unknown media type in type 'all/allfiles' Unknown media type in type 'uri/mms' Unknown media type in type 'uri/mmst' Unknown media type in type 'uri/mmsu' Unknown media type in type 'uri/pnm' Unknown media type in type 'uri/rtspt' Unknown media type in type 'uri/rtspu' Processing triggers for bamfdaemon ... Rebuilding /usr/share/applications/bamf.index... Processing triggers for desktop-file-utils ... Processing triggers for gnome-menus ... Errors were encountered while processing: openoffice.org3.4-debian-menus_3.4-9593_all.deb Can anyone solve the problem?

    Read the article

  • Google chrome cannot be installed

    - by Zxy
    I downloaded latest version of google chrome and then tried to install it. However it gave me errors. I searched through the net and noticed that most of the people's problem solved when they installed missing dependecies. Therefore I tried to install them too but seems like it does not work. zero@ubuntu:~/Downloads$ sudo apt-get install -f Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages will be REMOVED: google-chrome-stable:i386 0 upgraded, 0 newly installed, 1 to remove and 23 not upgraded. 1 not fully installed or removed. After this operation, 116 MB disk space will be freed. Do you want to continue [Y/n]? Y (Reading database ... 169296 files and directories currently installed.) Removing google-chrome-stable:i386 ... Processing triggers for man-db ... Processing triggers for desktop-file-utils ... Processing triggers for bamfdaemon ... Rebuilding /usr/share/applications/bamf.index... Processing triggers for gnome-menus ... zero@ubuntu:~/Downloads$ sudo dpkg -i google-chrome-stable_current_i386.deb Selecting previously unselected package google-chrome-stable:i386. (Reading database ... 169201 files and directories currently installed.) Unpacking google-chrome-stable:i386 (from google-chrome-stable_current_i386.deb) ... dpkg: dependency problems prevent configuration of google-chrome-stable:i386: google-chrome-stable:i386 depends on xdg-utils (>= 1.0.2). dpkg: error processing google-chrome-stable:i386 (--install): dependency problems - leaving unconfigured Processing triggers for desktop-file-utils ... Processing triggers for bamfdaemon ... Rebuilding /usr/share/applications/bamf.index... Processing triggers for gnome-menus ... Processing triggers for man-db ... Errors were encountered while processing: google-chrome-stable:i386 Could you please help me? Thanks.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >