How to get custom trigger result when insert

I set a trigger before insert, if the result was $aa = 50;
how to get $aa?
it doesn't work
$ins_testtable->addColumn("t_num", "NUMERIC_TYPE", "VALUE", $aa);

I tried this one, actually, {GLOBALS.variable_name} is one of mark-up language,I add echo $a this time, after submit, $a appear on the page, so I think "definea trigger" has been executed successfully, but still got error message
<br />
<br />http://uploads.screenshot-program.com/my.php?image=upl2682569831.jpg
<br />
<br />code
<br />--------------------------------------------------
<br /><?php require_once('Connections/conndb.php'); ?>
<br /><?php<br />// Load the common classes<br />require_once('includes/common/KT_common.php');<br /><br />// Load the tNG classes<br />require_once('includes/tng/tNG.inc.php');<br /><br />// Make a transaction dispatcher instance<br />$tNGs = new tNG_dispatcher("");<br /><br />// Make unified connection variable<br />$conn_conndb = new KT_connection($conndb, $database_conndb);<br /><br />//start definea trigger<br />function definea(&$tNG) {<br />global $a;<br />$a = 100;<br />}<br />//end definea trigger<br /><br />// Make an insert transaction instance<br />$ins_testtable = new tNG_insert($conn_conndb);<br />$tNGs->addTransaction($ins_testtable);<br />// Register triggers<br />$ins_testtable->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "ins");<br />$ins_testtable->registerTrigger("BEFORE", "definea", 50);<br />// Add columns<br />$ins_testtable->setTable("testtable");<br />$ins_testtable->addColumn("t_name", "STRING_TYPE", "POST", "t_name");<br />$ins_testtable->addColumn("t_num", "NUMERIC_TYPE", "VALUE", "{GLOBALS.a}");<br />$ins_testtable->setPrimaryKey("t_id", "NUMERIC_TYPE");<br /><br />// Execute all the registered transactions<br />$tNGs->executeTransactions();<br /><br />// Get the transaction recordset<br />$rstesttable = $tNGs->getRecordset("testtable");<br />$row_rstesttable = mysql_fetch_assoc($rstesttable);<br />$totalRows_rstesttable = mysql_num_rows($rstesttable);<br />?>
<br />
<br />
<br />
<br />
<br />
<br />
<script src="includes/common/js/base.js" type="text/javascript"></script>
<br />
<script src="includes/common/js/utility.js" type="text/javascript"></script>
<br />
<script src="includes/skins/style.js" type="text/javascript"></script>
<br />
<br />
<br />
<br /><?php echo $a; ?>
<br />
<form id="form1" name="form1" method="post" action="">
<br />
<label for="t_name">tname</label>
<br />
<input type="text" name="t_name" id="t_name" />
<br /> <?php<br /> echo $tNGs->getErrorMsg();<br />?>
<br />
<input type="submit" name="ins" id="ins" value="submit" />
<br /></form>
<br />
<br />

Similar Messages

  • How to get LR4 to open when inserting an SD card (MAC 10.8.2)

    I had LR3 opening when I inserted an SD card but when I installed LR4.4 it broke that and now I can't get LR4 to open when inserting a card. Still fairly new to MAC's so would appreciate any help.

    First:
    Go to Preferences>General Tab  and check Show import dialog when a memory card is detected.
    Second:
    Open Image Capture on your Mac (search for it in Spotlight)
    Insert your Card.
    Click on the card in the LH Pane.
    At the bottom of the Pane, set the default program to be Lightroom 4
    Close.
    It should work now.

  • How to get auto generated key when inserting  using C#

    I inserted a row in a table in oracle 11g as follows:
    public void add(Admin admin)
    OracleConnection myOracleConnection =
    new OracleConnection(connStr);
    myOracleConnection.Open();
    OracleCommand myOracleCommand = myOracleConnection.CreateCommand();
    myOracleCommand.CommandText = "Insert into Admin values(adminSeq.nextVal,:name) returning admin_id into :adminId";
    myOracleCommand.Parameters.Clear();
    OracleParameter para=new OracleParameter(":adminId",ParameterDirection.Output);
    myOracleCommand.Parameters.Add(para);
    myOracleCommand.Parameters.Add(":name", admin.Name);
    myOracleCommand.ExecuteNonQuery();
    admin.AdminId = int.Parse(myOracleCommand.Parameters[":adminId"].Value.ToString());
    I found a new row a ADMIN, but I can not get the PK when inserting. the value of "myOracleCommand.Parameters[":adminId"].Value" is always "OUTPUT" , any ideas?
    Thank you.
    Edited by: user11228816 on 2010-3-1 上午12:17

    Does not seem to be an Oracle issue itself. Your approach is correct. E.g.
    SQL> create table foo( id number, name varchar2(20) );
    Table created.
    SQL>
    SQL> create sequence foo_id start with 1 increment by 1 nomaxvalue nocycle;
    Sequence created.
    SQL>
    SQL> var id number
    SQL> insert into foo values( foo_id.nextval, 'test1') returning id into :id;
    1 row created.
    SQL>
    SQL> print id
            ID
             1
    SQL>Check your bind calls. Is the bind name index value for example not perhaps +["adminId"]+ (no bind char marker)?
    Also, the binding of the output parameter, i.e.
    para=new OracleParameter(":adminId",ParameterDirection.Output);In OCI, when binding, one needs to specify the data type for the bind. When binding strings for example, the length also needs to be specified. This bind seems to be untyped. Yet, you apply a "+ToString()+" method to it when referencing it.. how would the Parameters class know its data type?
    Can you do explicit data type binding in C#? If so, try and bind the parameter explicitly as an integer and reference it as an integer when getting its value.

  • How to get best image quality when inserting PDF into Word?

    I am able to insert a PDF as an object into Word, but the image quality is slightly blurry.  Is there anything I can adjust to improve image clarity in Word?

    You can try to extract the images using Extract All Images or select the Settings on the save screen that you get when you save to a DOC, but I think the general result is that the image saves with the same resolution as contained in the PDF. It may be that you need to just adjust your screen in WORD. You might want to look at the image in WORD and see if it is being used at 100% or some other resolution. Bitmaps are not very forgiving if the resolution is changed for the document and does not like anything other than low number fractions of resolution display change.

  • How to get the correct result when I access mxml file in address bar in IE?

    os: windows xp
    web server: tomcat 5.5
    lcds version: 2.6
    One week ago, I installed lcds2.5 in my coumputer. At that time, when I type address http://localhost/lcds/test.mxml in address bar of Internet Explorer, the web server return the result of test.swf.
    I upgraded lcds from 2.5 to 2.6 this morning, and then when I type http://localhost/lcds/test.mxml in IE address bar again, the server return the source code of text.mxml in the web page, which is not I expected.
    Why the web server don't handle the *.mxml file like in lcds2.5? How can I resolve this problem?

    Hi,
    Webtier Compiler is which is no longer part of LCDS starting with the version 2.6. However you can install it if you want, read the instructions from this link http://labs.adobe.com/wiki/index.php/LiveCycle_Data_Services:Setting_up_an_SDK,_Compilers ,_and_Flex_Builder

  • Can only get the "Draft" stamp when insert customer stamp with C#+JS

    I am trying to insert customer stamp in batch files with C#+JS.
    My JS works well in Acrobat. However, it doesn't work when use C#+JS. I always get the Acrobat's "Draft" stamp other than my own ones (the AP value is confirmed correct).
    In c#, it runs as this ( with the objectype.InvokeMember())
    1. initial an annotation with addAnnot first and get the properties object with method of getProp().
    2. Set the type entry of the properties object as "Stamp"
    3. With setProp(), modify the annotation to a Stamp annotation, and then get the properties object of the Stamp annotation.
    4. Set the entries (rect, page, AP ) of the properties object. Then use setProp() again to modify the properties of the Stamp annotation.
    The program runs without any error message. But I can only get the default stamp "Draft".
    One thing I found so far, in JS console in Acrobat, if I set the AP properties AFTER set the annotation type to "Stamp", it also get the "Draft" stamp only. as this,
         annot = this.addAnnot();
         prop = annot.getProps();
         prop.type = "Stamp";
         annot.setProps(prop);
         prop = annot.getProps();
         prop.page = 0;
         prop.rect = [0, 0, 100, 100];
         prop.AP = "#xxxxxxxx";
         annot.setProps(prop);
    If I set the prop.Ap before the forth line in above para, I can get the right stamp.
         annot = this.addAnnot();
         prop = annot.getProps();
         prop.type = "Stamp";
         prop.AP = "#xxxxxxxx";
         annot.setProps(prop);
         prop = annot.getProps();
         prop.page = 0;
         prop.rect = [0, 0, 100, 100];
         annot.setProps(prop);
    Or, if I set the props in the typcial JS format like below, I also get the right one
    annot = this.addAnnot({
    type: stamp,
    page: 0,
    rect: [0,0,100,100]
    AP: #xxxxxxxx)});
    But, the problem is, in C#, the AP properties can only be set after set the annotation type as Stamp (step 4). I think this might be the reason, but I don't know how to get over this.
    Please help. Thanks!

    No, it can't – but you could do that yourself as part of the watermarking process (ie. Two watermarks or fields)
    From: santa-satan <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Mon, 6 Feb 2012 18:35:19 -0800
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: Can only get the "Draft" stamp when insert customer stamp with C#+JS
    Re: Can only get the "Draft" stamp when insert customer stamp with C#+JS
    created by santa-satan<http://forums.adobe.com/people/santa-satan> in Acrobat SDK - View the full discussion<http://forums.adobe.com/message/4190155#4190155

  • How to get the Useru2019s position when the user doesnu2019t have CP relation

    We have a custom program which will add / delete attributes (In transaction PPOSA_BBP). It is working fine for users which were assigned with CP relation But it fails for users which doesnu2019t have CP relation (since we are getting the position of users form HRP1001 then we are retrieving the existing attributes based on the position after that updating the attributes) as we are getting the position from HRP1001 it fails for users were no CP relation.
    Help us how to get the Useru2019s position when the user doesnu2019t have CP relation. Suggest us any function module or how to query the HRP1001 or some other table if exists
    Regards
    Paul

    Hi Paul,
    Have a look at these tables.
    Using table BUT000 the central business partner data are stored, f.e. partner type, partner names, partner number, partner guid, person number, etc. In table BUTBKK the bank data to a business partner are stored.
    Central business partner address data
    The table ADRC is used for the address of a business partner. Table BUT020 links the business partner number with the address number. Using table BUT021 several addresses to a business partner with different usages (modes), f.e. correspondence or delivery address, can be stored. The personal data of a business partner person are stored with key person number in table ADRP. The person number is assignd to a business partner person in table BUT000. Communication data of business partners as e-mail, telephone, fax, etc. are stored in the tables ADDR1 u2013 ADDR12. The business address of a contact person or an employee consists of the organization address (company resp. org.-unit) and of an address addition, which describes f.e. a building, a room number, etc. The address addition is stored in table ADCP and is identified by the keys address number of the organization address and person number.
    Relationships between business partners
    Table BUT050 contains the relationships between a business partner organization and a business partner person using relation types. The relation types are defined in table TBZ9, f.e. the relation type u2018has employeeu2019 corresponds to identifier u2018BUR010u2019, the relation type u2018has contact personu2019 corresponds to identifier u2018BUR001u2019. Table BUT051 stores communication data of a contact person relationship (compare to table ADCP). Table BUT052 stores several address numbers to one business partner relationship (including a standard flag).
    Hope this helps,
    Kind Regards,
    Matthew

  • How to get custom defined messages in WAD

    Hi
    can you please help me how to get customized error messages in WAD.
    While I'm executing in RSRT the customer exit variable throws error message saying that 'No Sales orders exist for this Sold_To Party' but when I execute same query using Bex WAD, then no error message throwing for me for given sold_to party. I tried with all options as given in below code, but WAD gives me system error that "No values found for the customer exit variable 'Zxxxx'. Please help me in this regard. Should I do any settings in WAD to get custom defined messages. Kindly let me know
    my code is as below
    I_STEP = 2.
    CASE i_vnam.
    WHEN 'Custome exit variable'.
    IF sy-subrc = 0.
    ELSE.
                   MESSAGE e060(/bmc/bw).  "No Authorization exist
                    g_errflag1 = 'X'.
                   exit.
                   CALL FUNCTION 'RRMS_MESSAGE_HANDLING'
                      EXPORTING
                        i_class  = '/bmc/bw'
                        i_type   = c_e                                    "'E'
                        i_number = '061'
                        i_msgv2  = l_msgv2.
                         RAISE NO_REPLACEMENT.
                    l_s_range-low = g_soldto.
              l_s_range-sign = c_sign_i.
              l_s_range-opt  = c_range_opt_eq.
              APPEND l_s_range TO e_t_range.
    ENDIF.
    I_STEP = 3.
      READ TABLE i_t_var_range INTO w_s_var_range
                  WITH KEY vnam = 'customer exit variabel'.
      IF sy-subrc = 0.
    Check the flag and throw message 'No Sales orders'.
        IF g_errflag1 = 'X'.
          l_msgv1     = 'No Sales orders'.
    Call the FM to populate message
          CALL FUNCTION 'RRMS_MESSAGE_HANDLING'
            EXPORTING
              i_class  = c_r9
              i_type   = c_e                                    "'E'
              i_number = c_000
              i_msgv1  = l_msgv1
            EXCEPTIONS
              dummy    = 0
              OTHERS   = 0.
         CALL FUNCTION 'RRMS_MESSAGES_SHOW'.
         CALL FUNCTION 'RRMS_MESSAGES_DELETE'.
          RAISE NO_REPLACEMENT..
        ENDIF.
    Thanks & Regards
    silu

    Hi
    Custom Messages WAD

  • How to get UTF-8 encoding when create XML using DBMS_XMLGEN and UTL_FILE ?

    How to get UTF-8 encoding when create XML using DBMS_XMLGEN and UTL_FILE ?
    Hi,
    I do generate XML-Files by using DBMS_XMLGEN with output by UTL_FILE
    but it seems, the xml-Datafile I get on end is not really UTF-8 encoding
    ( f.ex. cannot verifying it correct in xmlspy )
    my dbms is
    NLS_CHARACTERSET          = WE8MSWIN1252
    NLS_NCHAR_CHARACTERSET     = AL16UTF16
    NLS_RDBMS_VERSION     = 10.2.0.1.0
    I do generate it in this matter :
    declare
    xmldoc CLOB;
    ctx number ;
    utl_file.file_type;
    begin
    -- generate fom xml-view :
    ctx := DBMS_XMLGEN.newContext('select xml from xml_View');
    DBMS_XMLGEN.setRowSetTag(ctx, null);
    DBMS_XMLGEN.setRowTag(ctx, null );
    DBMS_XMLGEN.SETCONVERTSPECIALCHARS(ctx,TRUE);
    -- create xml-file:
    xmldoc := DBMS_XMLGEN.getXML(ctx);
    -- put data to host-file:
    vblob_len := DBMS_LOB.getlength(xmldoc);
    DBMS_LOB.READ (xmldoc, vblob_len, 1, vBuffer);
    bHandle := utl_file.fopen(vPATH,vFileName,'W',32767);
    UTL_FILE.put_line(bHandle, vbuffer, FALSE);
    UTL_FILE.fclose(bHandle);
    end ;
    maybe while work UTL_FILE there is a change the encoding ?
    How can this solved ?
    Thank you
    Norbert
    Edited by: astramare on Feb 11, 2009 12:39 PM with database charsets

    Marco,
    I tryed to work with dbms_xslprocessor.clob2file,
    that works good,
    but what is in this matter with encoding UTF-8 ?
    in my understandig, the xmltyp created should be UTF8 (16),
    but when open the xml-file in xmlSpy as UTF-8,
    it is not well ( german caracter like Ä, Ö .. ):
    my dbms is
    NLS_CHARACTERSET = WE8MSWIN1252
    NLS_NCHAR_CHARACTERSET = AL16UTF16
    NLS_RDBMS_VERSION = 10.2.0.1.0
    -- test:
    create table nh_test ( s0 number, s1 varchar2(20) ) ;
    insert into nh_test (select 1,'hallo' from dual );
    insert into nh_test (select 2,'straße' from dual );
    insert into nh_test (select 3,'mäckie' from dual );
    insert into nh_test (select 4,'euro_€' from dual );
    commit;
    select * from nh_test ;
    S0     S1
    1     hallo
    1     hallo
    2     straße
    3     mäckie
    4     euro_€
    declare
    rc sys_refcursor;
    begin
    open rc FOR SELECT * FROM ( SELECT s0,s1 from nh_test );
    dbms_xslprocessor.clob2file( xmltype( rc ).getclobval( ) , 'XML_EXPORT_DIR','my_xml_file.xml');
    end;
    ( its the same when using output with DBMS_XMLDOM.WRITETOFILE )
    open in xmlSpy is:
    <?xml version="1.0"?>
    <ROWSET>
    <ROW>
    <S0>1</S0>
    <S1>hallo</S1>
    </ROW>
    <ROW>
    <S0>2</S0>
    <S1>straޥ</S1>
    </ROW>
    <ROW>
    <S0>3</S0>
    <S1>m㢫ie</S1>
    </ROW>
    <ROW>
    <S0>4</S0>
    <S1>euro_€</S1>
    </ROW>
    </ROWSET>
    regards
    Norbert

  • How to get the search option when we are creating new view

    Hi,
    How to get the search functionality when we are creating new view.
    Ex:- if we see the standard component BT112S_SC. Under this
    AdvancedSP  is the view,
    same kind of view if i want to create new view with same bol entity in my new component. I am unable to get that search functionality.
    for search functionality,,i think view should inherit the super class CL_BTSRV_ADVS_CNTRL, but in my new view controller class, i am unable to find this class.
    Can anybody give me some inputs on this.
    Thanks,
    neelam

    In case you are still not able to proceed please refer the following blog.
    http://blogs.moovar.com/sap/sap-crm-web-ic-create-a-new-search-view-and-result-view
    Regards,
    Harshit

  • How to get Manager id automatically when Employee Id is given.

    How to get Manager id automatically when Employee Id is given.
    1) I created a simple BO with two elements namely
        1.Employee Id
        2.Manager id
    How to get employee's first name and last name?
    And how will i get manager id  automatic when i click employee id in element field.
    Anbu.

    Have you tried to use "APPS.FND_CONCURRENT" API?
    http://etrm.oracle.com/pls/trm11510/etrm_pnav.show_object?c_name=FND_CONCURRENT&c_owner=APPS&c_type=PACKAGE
    http://etrm.oracle.com/pls/trm11510/etrm_pnav.show_object?c_name=FND_CONCURRENT&c_owner=APPS&c_type=PACKAGE%20BODY
    Thanks,
    Hussein

  • How to get those Char Description when i record please give a solution

    Hi Experts
    when i try to extend using BDC the meterial all data is getting copied to new plant but in MRP3 Configure varients is not getting copied in bdc i am getting all the values from parent plant but these values are not getting displayed in new plant for only *MRP3 Configure varients
    how to get those values please give a solution
    and
    when i am trying to make the BDC recording of creation of meterial in this process
    in MRP3 when i give configurable meterial  = Lamp  or CT or VOLTMETER and when
    i go for configurevariants button it's not displaying any Char Description  for the perticular meterial
    but in general when i creat a material process  there Char Description  are coming where i can give the values
    how to get those Char Description when i record please give a solution

    Hi Maen Anachronos
    i am Getting popup where i can give any value
    but in creation of meterial for a perticular config meterial there is will be 1 templete in which we will get some constant  Char Description where we'll have some options to give the value
    but when it 's done in BDC Recording  it's not displaying any values Char Description then how can we decide the values to what to give when Recording

  • How to get the fixed result in a DES/CBC mode with fixed input data and fix

    How to get the fixed result in a DES/CBC mode with fixed input data and fixed key. Below is my program , I tried to get the checksum of the DESInputData with the DESKeyData, but each time the result is different.
    below is my code:
    byte[] DESKeyData = {(byte)0x01 ,(byte)0x01 ,(byte)0x01 ,(byte)0x01, (byte)0x01 ,(byte)0x01 ,(byte)0x01 ,(byte)0x01 };
    byte[] DESInputData = {(byte)0x31 ,(byte)0x31 ,(byte)0x31 ,(byte)0x31,(byte)0x31 ,(byte)0x31 ,(byte)0x31 ,(byte)0x31 };
    SecretKeySpec skey = new SecretKeySpec( DESKeyData, "DES" );
    Cipher cipher = Cipher.getInstance("DES/CBC/NoPadding");
    cipher.init( Cipher.ENCRYPT_MODE, skey );
    byte[] result = cipher.doFinal( DESInputData );

    Use class javax.crypto.spec.IvParameterSpec to specify IV for CBC mode cipher:
    // Create CBC-mode triple-DES cipher.
    Cipher c = Cipher.getInstance("DESede/CBC/PKCS5Padding");
    // Specify IV.
    IvParameterSpec iv = new IvParameterSpec(new byte[] { (byte)0x01, (byte)0x23, (byte)0x45, (byte)0x67, (byte)0x89, (byte)0xAB, (byte)0xCD, (byte)0xEF });
    // Initialize cipher with proper IV.
    c.init(Cipher.ENCRYPT_MODE, yourKey, iv);
    // Encrypt and decrypt should work ok now.
    For more info about cryptography, search the Internet for IntroToCrypto.pdf from mr. Phil Zimmerman. This document is also part of PGP (http://www.pgp.com).
    An excellent book is 'Applied Cryptography' from Bruce Schneier (http://www.counterpane.com/applied.html).
    Regards,
    Ronald Maas

  • How to get the query result of improvement (Before and After ) using sql de

    how to get the query result of improvement (Before and After ) using sql developer.

    Check
    http://www.oracle.com/technetwork/articles/sql/exploring-sql-developer-1637307.html

  • How to get the full result of a google search?

    How to get the full results of a google search?
    Nov 23, 2006 2:28 AM
    Hi, Friends,
    I want to build a URL collector as a seamless and integrated part of my desktop application in java language which can access the full search results of google, but i am not sure the right way? what is the best way to do that in java?
    Where to find the relevant materials for the problem?
    thanks a lot

    Cross post - http://forum.java.sun.com/thread.jspa?threadID=788627&messageID=4481369#4481369

Maybe you are looking for

  • Plant not visible in PR and PO

    Dear All I have defined new Plant and the same is showing when I create Quotation.However when I am trying to create PR or PO it is not showing in Purchase Requisition or Purchase Order. Any reason for this?

  • Custom book export resolution problem in PDF - only 150DPI!?

    I've been using the custom book option and when it came to exporting my PDF I have run into a problem involving the undocumented output resolution of a PDF at a given size. The custom book dialog allows you to create a book with a certain size in inc

  • Tricky Help

    I have simple sql query in my report, when i execute report result will vertically, i need to show horizontally in out put. To better understand i will eg below. select abc,ddd from dual; Report Output: abc xxx yyy zzz I need to show report out put l

  • GDM: How to display it in the first screen (Dual monitors)

    I have a PCI Express video card which i use for video-output for two screens. The hing is that when i boot the system up, and gnome gives me the choice for selecting the user and so (GDM), this appears in the secondary screen, which is most of the ti

  • HT201320 im trying to set a email up on the exchange and it will not allow me

    I am trying to set a email in exchange and it will not allow me to do so