Insert PivotTable values

I want to pass the string to a method, the method where values are inserted in the database table, how do I do it

public void insertData(int cid,String ttl,String folderName){
        try
        {
     uri = URI.create("file:///SDCard/documents/database1.db");
        d = DatabaseFactory.open(uri);
        Statement st = d.createStatement("INSERT INTO app_detail(CID,TITLE,FOLDERNAME) " +
        "VALUES (cid,ttl,folderName)");
        st.prepare();
        st.execute();
        st.close();
        d.close();
    }
        catch ( Exception e ) {
            System.out.println( e.getMessage() );
            e.printStackTrace();
        }
    }

I get unless I pass values dynamics, while if I hardcoded values like this

Statement st = d.createStatement("INSERT INTO app_detail(CID,TITLE,FOLDERNAME) " +
        "VALUES (25,''title','fname')");

This works. Help, please

It was actually a parametarized insert and I have fixed in this way, incase anyone having similar problem, code below can be useful

uri = URI.create("file:///SDCard/documents/databsae1.db");
            d = DatabaseFactory.open(uri);
            Statement s = d
                    .createStatement("INSERT INTO app_detail(CID,TITLE,FOLDERNAME) "
                            + "VALUES (?, ?, ?)");
            s.prepare();
            s.bind(1, cid);
            s.bind(2, ttl);
            s.bind(3, folderName);
            s.execute();
            s.close();
            d.close();

Tags: BlackBerry Developers

Similar Questions

  • Insert Varray values in a cluster where the table is

    Hei,

    I use the openG libraries. I have a HAND in cluster that has 2 groups A, B that contains the different controllers (bool, strings, integers, enum) and a C array which has a cluster that contains also various controllers. What I want to do, is to read an INI file and save it in cluster A, B & C table. I managed to write the values for A, B clusters, but with table C, I have a few problems.

    How or which is the best way to access the values in the INI file and save it in table C that belongs to a MAIN cluster. The code below is how I do for the cluster A and B.

    Thanks for the help.

    Hello

    I apologize for the poor explanation. I need to work on that. Let's see if I can do better...

    I have some sections that I want to represent as clusters AND some sections of an array of clusters where the key values match grapes controls in the INI file. In addition, the VI has a core that has clusters with some elements (int, string, enum) and an array of cluster that also has some elements. I hope that is not confusing. To simplify, I want to write the values for 'children' of the main groups. As you may have noticed that I prepare this code as an object-oriented approach.

    Here is the solution I got on LAVA: https://lavag.org/topic/18951-insert-varray-values-into-a-cluster-where-the-array-is/

    Thank you for contributing

  • Please how can I insert a value of richinputtext in the database string attribute

    Please how can I insert a value of richinputtext in the database string attribute

    If you can get its value at the bean and then call your insert statement to put it in the DB table

    and if you want to know about the execution of SQL query

    then check - Ashish Awasthi (Jdev/ADF) Blog: SQL to run in an ADF Application using DataSource DBTransaction & JDBC query

    Ashish

  • How to insert the value from the FORM to another database table?

    Hi all

    I have the following problem.

    I have a form that has a tabular layout for the MATURED_FD_DTLtable. (all about 20 line items)

    CREATE TABLE MATURED_FD_DTL

    (

    ACCT_FD_NO VARCHAR2 (17 BYTE) NOT NULL,

    CUST_CODE NUMBER (9),

    FD_AMT NUMBER (15),

    FD_INT_BAL NUMBER (15),

    TDS NUMBER (15),

    CHQ_NO NUMBER (10),

    CREATED_DATE DATE,

    CREATED_BY VARCHAR2 (15 BYTE),

    PREV_YR_TDS NUMBER (15),

    ADD_FD_AMT NUMBER (15),

    DESCRIPTION VARCHAR2 (100 BYTE),

    P_SAP_CODE NUMBER (10),

    P_TYPE VARCHAR2 (1 BYTE)

    )

    By clicking on 'SAVE' button, all values will be automatically is stored in the MATURED_FD_DTLdatabase table.

    But I want to insert these values in another table called TEMP.

    I want to insert values of form only, no table select.

    How can I do this?

    Help me.

    Is Oracle Designer 6i.

    Answer:

    BEGIN

    Commit_form;

    PREMIER_ENREGISTREMENT;

    LOOP

    insert into TEMP_MATURED_FD_DTL

    SELECT * FROM MATURED_FD_DTL WHERE ACCT_FD_NO =: acct_fd_NO;

    WHEN THE OUTPUT: SYSTEM. LAST_RECORD = "TRUE";

    NEXT_RECORD;

    END LOOP;

    PREMIER_ENREGISTREMENT;

    COMMIT;

    MESSAGE ("RECORD UPDATED AS PAID '");

    MESSAGE (' ', no_acknowledge);

    END;

  • Insert some values into multiple tables. One of the tables has a complex primary key.

    Hello, I am using Jdeveloper version 11.1.2.3.0

    I have a FORM_TYPE table and another table Str. The table of Str is used to translate the strings from the name of the table which are read from another program from the database and used to generate forms...

    The FORM_TYPE table has a relationship with the table of STR via formtype.title_str_id = str.str_id.

    STR. table has a primary key which is based on the mf_language and str_id. columns I generated the entity for the table of STR, but impossible to insert new values of add-on application for some reason any... It is said that recording invalidates its own entity...

    I am trying to create a table that will be editable and will have the column Description, name, cdes in English, Str in French etc...

    To create a Form_Type and at the same time insert new values for each language. But can not do the inserts of the new work of STR...

    Also the FormType.TITLE_STR_ID already has a lot of null values in the database.

    SELECT FormType.DESCRIPTION,

    FormType.FORM_TYPE_ID,

    FormType.NAME,

    FormType.PAPER_REPORT_FORMAT,

    FormType.PAPER_REPORT_NAME,

    FormType.TITLE_STR_ID,

    in. En_str str,

    in. STR_ID,

    en.object_name en_object_name,

    Fr. Str,

    Fr. STR_ID,

    Fr.object_name,

    of the. Str,

    of the. STR_ID,

    du.object_name,

    BG.Str,

    BG. STR_ID,

    BG.object_name

    OF FORM_TYPE FormType.

    (select str.str_id, str.mf_language_id, str.str, str.object_name

    of mf_language ml, str

    where ml.mf_language_id = str.mf_language_id

    and ml.code = 'fr') en

    (select str.str_id, str.str, str.object_name

    of mf_language ml, str

    where ml.mf_language_id = str.mf_language_id

    and ml.code = 'fr') en,.

    (select str.str_id, str.str, str.object_name

    of mf_language ml, str

    where ml.mf_language_id = str.mf_language_id

    and ml.code = 'from'),

    (select str.str_id, str.str, str.object_name

    of mf_language ml, str

    where ml.mf_language_id = str.mf_language_id

    and ml.code = 'bg') bg

    WHERE

    FormType.title_str_id = en.str_id and

    FormType.title_str_id = fr.str_id and

    FormType.title_str_id = du.str_id and

    FormType.title_str_id = bg.str_id

    Each table that you want to update must have its own entity object. You need to connect it to an another VO/OS using the associations/view links

  • Insert the value from the date of the operation, max

    Hello

    We use oracle 10g R2 on windows.

    I want to insert values from one table to the other. Suppose I have a table emp (empcode, salary, dt_update) and have another table emp_live (empcode, salary).

    data into the emp table are as
    EMPCODE     SALARY     DT_UPDATE
    
    281G     10611230.319     10/9/2010 6:38:30 PM
    281G     37819399.457     10/8/2010 6:38:30 PM
    291G     16500012.429     10/10/2010 6:38:30 PM
    291G     108145595.738     10/9/2010 6:38:30 PM
    292G     79449005.406     10/11/2010 6:38:30 PM
    292G     198819948.865     10/10/2010 6:38:30 PM
    293E     4532332.618     10/12/2010 6:38:30 PM
    293E     142572824.216     10/11/2010 6:38:30 PM
    294D     116505728.748     10/13/2010 6:38:30 PM
    294D     90087585.925     10/12/2010 6:38:30 PM
    My requirement is to insert only those records where the maximum date of DT_UPDATE.

    In the above senario only records below need to obtain insert
    EMPCODE     SALARY     DT_UPDATE
    281G     10611230.319     10/9/2010 6:38:30 PM
    291G     16500012.429     10/10/2010 6:38:30 PM
    292G     79449005.406     10/11/2010 6:38:30 PM
    293E     4532332.618     10/12/2010 6:38:30 PM
    294D     116505728.748     10/13/2010 6:38:30 PM
    I am trying to insert it as
    insert into emp_live select empcode,salary from emp where dt_update=(select max(dt_update) from emp)
    But above not giving not correct results beacase when I select the records as
    select empcode,max(dt_update) from emp group by empcode
    Above shows 1665 records, but when I am inserting only insert 16 records.

    Help, please.

    Something like this:

    create table test (empcode varchar2 (4), salary number, date of dt_update);
    Insert test values (' ' 281 G ", 10611230.319, to_date (October 9, 2010 06:38:30 ',' mm/dd/yyyy HH24:MI:SS));))
    Insert test values (' ' 281 G ", 37819399.457, to_date (October 8, 2010 06:38:30 ',' mm/dd/yyyy HH24:MI:SS));))
    Insert test values (' ' 291 G ", 16500012.429, to_date (October 10, 2010 06:38:30 ',' mm/dd/yyyy HH24:MI:SS));))
    Insert test values (' ' 291 G ", 108145595.738, to_date (October 9, 2010 06:38:30 ',' mm/dd/yyyy HH24:MI:SS));))
    Insert test values (' ' 292 G ", 79449005.406, to_date (October 11, 2010 06:38:30 ',' mm/dd/yyyy HH24:MI:SS));))
    Insert test values (' ' 292 G ", 198819948.865, to_date (October 10, 2010 06:38:30 ',' mm/dd/yyyy HH24:MI:SS));))
    insert into test values ('293E', 4532332.618, to_date (October 12, 2010 06:38:30 ',' mm/dd/yyyy HH24:MI:SS));))
    insert into test values ('293E', 142572824.216, to_date (October 11, 2010 06:38:30 ',' mm/dd/yyyy HH24:MI:SS));))
    Insert test values ('294, 116505728.748, to_date (October 13, 2010 06:38:30 ',' mm/dd/yyyy HH24:MI:SS));))
    Insert test values ('294, 90087585.925, to_date (October 12, 2010 06:38:30 ',' mm/dd/yyyy HH24:MI:SS));))

    SQL> column salary for 99999999999.9999;
    SQL> select * from test;
    
    EMPC            SALARY DT_UPDATE
    ---- ----------------- ---------
    281G     10611230.3190 09-OCT-10
    281G     37819399.4570 08-OCT-10
    291G     16500012.4290 10-OCT-10
    291G    108145595.7380 09-OCT-10
    292G     79449005.4060 11-OCT-10
    292G    198819948.8650 10-OCT-10
    293E      4532332.6180 12-OCT-10
    293E    142572824.2160 11-OCT-10
    294D    116505728.7480 13-OCT-10
    294D     90087585.9250 12-OCT-10
    
    10 rows selected.
    
    SQL> ed
    Wrote file afiedt.buf
    
      1  select min(empcode),max(salary),max(dt_update)
      2  from test
      3  group by empcode
      4* order by 1
    SQL> /
    
    MIN( MAX(SALARY) MAX(DT_UP
    ---- ----------- ---------
    281G  37819399.5 09-OCT-10
    291G   108145596 10-OCT-10
    292G   198819949 11-OCT-10
    293E   142572824 12-OCT-10
    294D   116505729 13-OCT-10
    
    SQL> insert into test
      2  (
      3  select min(empcode) empcode,max(salary) salary,max(dt_update) dt_update
      4  from test
      5  group by empcode
      6  )
      7  /
    
    5 rows created.
    
    SQL> select * from test;
    
    EMPC            SALARY DT_UPDATE
    ---- ----------------- ---------
    281G     10611230.3190 09-OCT-10
    281G     37819399.4570 08-OCT-10
    291G     16500012.4290 10-OCT-10
    291G    108145595.7380 09-OCT-10
    292G     79449005.4060 11-OCT-10
    292G    198819948.8650 10-OCT-10
    293E      4532332.6180 12-OCT-10
    293E    142572824.2160 11-OCT-10
    294D    116505728.7480 13-OCT-10
    294D     90087585.9250 12-OCT-10
    281G     37819399.4570 09-OCT-10
    
    EMPC            SALARY DT_UPDATE
    ---- ----------------- ---------
    293E    142572824.2160 12-OCT-10
    294D    116505728.7480 13-OCT-10
    291G    108145595.7380 10-OCT-10
    292G    198819948.8650 11-OCT-10
    
    15 rows selected.
    
    SQL>
    

    Concerning
    Girish Sharma

  • Using the cursor to insert a value

    Hello
    I created a procedure mentioned below, using the slider that I want to insert a value in the table its not to insert any value. You can one to find the solution. I have compiled the procedure there is no errors...

    I have a lot of value in the employee... then after table do not perform the procedures no value in employee_lkp


    My structure from the Employee table is

    CREATE TABLE 'VIDHYA '. "' EMPLOYEE '.
    (
    VARCHAR2 (15 BYTE) "PNOM."
    'MINIT' VARCHAR2 (2 BYTE),
    VARCHAR2 (15 BYTE) "LNAME",.
    ACTIVATE THE "SSN" NUMBER (12.0) NOT NULL,
    "BDATE" DATE,
    'ADDRESS' VARCHAR2 (35 BYTE),
    'SEX' VARCHAR2 (1 BYTE),
    ACTIVATE THE "WAGES" NUMBER (7,0) NOT NULL,
    NUMBER (12.0) "SUPERSSN."
    ACTIVATE THE 'DNO' NUMBER (2.0) NOT NULL,
    ACTIVATE THE STATISTICS STORAGE CALCULATION (INITIAL 65536 THEN 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 USER_TABLES DEFAULT TABLESPACE) 'USERS' CONSTRAINT 'PK_EMPLOYEE' KEY PRIMARY ("SSN") WITH THE HELP OF INDEX PCTFREE 10 INITRANS MAXTRANS 255 2.
    CONSTRAINT 'FK_DEPARTMENT' FOREIGN KEY ('DNO') REFERENCES 'VIDHYA '. "" DEPARTMENT "("DNUMBER") ALLOW
    )


    employee_lkp structure is

    CREATE TABLE 'VIDHYA '. "" EMPLOYEE_LKP ".
    (
    VARCHAR2 (250 BYTE) "PNOM."
    VARCHAR2 (250 BYTE) "LNAME",.
    'ID '.
    )


    create or replace
    procedure employeelkp is
    number of add_val;
    i the number;
    number num.
    add_name cursor is select * from employee;
    name_cur add_name % rowtype;
    Start
    Open add_name;
    Select count (*) in the number of the employee;
    because me in 1.num
    loop
    extract the add_name in name_cur;
    insert into employee_lkp (id, fname, lname)
    values (i,
    name_cur. Lname,
    name_cur.fname);
    When the output add_name % notfound;
    end loop;
    close add_name;
    end employeelkp;

    Try this...
    Add

    commit;
    

    After

    close add_name;

    at the bottom.

    I hope this helps...

    Hamid

  • Calculations using to insert a value into an existing item?

    Hello.

    I'm experimenting with calculations. I am quite new to APEX, but I really need to make sure that it works.
    So this calculation, it is supposed to take the value of an element (in which a user has entered a number) and then make a calculation with this value. You will see in the code below.

    Some additional information: when a user enters a certain weight value (say only 80 grams), and then press enter in the text field, this calculation runs. Now, it does not work because I saw it by checking the session. But I did not get out on how to display the results. So I thought to put the results in the elements, which appear here again in a region.

    What I'm wondering is, how can I change my source code, in such a way that the return values will be inserted into existing already the elements on the page?

    It's my source code of calculation:
    DECLARE
    a_unit varchar2 (20);
    float a_old_kcal;
    float a_new_kcal;
    float a_old_carbs;
    float a_new_carbs;
    float a_old_weight;
    float a_new_weight;

    BEGIN
    SELECT standardamount INTO a_old_weight,
    kcal IN a_old_kcal,
    carbohydrates IN a_old_carbs,
    name IN a_unit
    OF foodunit
    WHERE foodunit.foodunitid =: P17_SET_UNIT;
    IF a_unit: = "gram" THEN
    a_new_kcal: a_old_kcal/100 = *: P17_SET_WEIGHT; *
    a_new_carbs: a_old_carbs/100 = *: P17_SET_WEIGHT; *
    a_new_weight: =: P17_SET_WEIGHT;
    ON THE OTHER
    a_new_kcal: = a_old_kcal;
    a_new_carbs: = a_old_carbs;
    a_new_weight: = a_old_weight;
    END IF;

    RETURN a_new_weight;
    RETURN a_new_carbs;
    RETURN a_new_kcal;
    END;


    I want it back a_new_weight, a_new_carbs, and a_new_kcal as elements. I made the items named P17_NEW_WEIGHT, P17_NEW_CARBS, and P17_NEW_KCAL already, and my plan is to insert a_new_weight values in P17_NEW_WEIGHT and so on.

    How can I change the source code of my calculation so that it will insert these values in the above?


    Thank you very much for your help!

    PS: Please leave a response, even if this isn't a complete answer. Any help is welcome and much appreciated. ;)



    Best regards

    Magali

    Magali wrote:
    Hello.

    I'm experimenting with calculations. I am quite new to APEX, but I really need to make sure that it works.

    You will get a faster, more effective response to your questions including information as much information as possible from the outset. This should include:

  • Full version of APEX
  • Complete operating system DB, version, edition, host
  • Architecture of Web server (EPG, SST or APEX listener/host operating system)
  • Browser (s) and version (s) used
  • Theme
  • Model (s)
  • Region/item (s)

    So this calculation, it is supposed to take the value of an element (in which a user has entered a number) and then make a calculation with this value. You will see in the code below.

    So did you read the documentation on Computattions?

    Some additional information: when a user enters a certain weight value (say only 80 grams), and then press enter in the text field, this calculation runs. Now, it does not work because I saw it by checking the session.

    'Check' the session how? Cannot run the code below because it contains syntax errors:

    SQL> var p17_set_unit varchar2(10)
    SQL> var p17_set_weight number
    SQL> DECLARE
      2  a_unit varchar2(20);
      3  a_old_kcal float;
      4  a_new_kcal float;
      5  a_old_carbs float;
      6  a_new_carbs float;
      7  a_old_weight float;
      8  a_new_weight float;
      9
     10  BEGIN
     11  SELECT standardamount INTO a_old_weight,
     12  kcal INTO a_old_kcal,
     13  carbs INTO a_old_carbs,
     14  name INTO a_unit
     15  FROM foodunit
     16  WHERE foodunit.foodunitid = :P17_SET_UNIT;
     17  IF a_unit := 'gram' THEN
     18  a_new_kcal := a_old_kcal/100 * :P17_SET_WEIGHT;
     19  a_new_carbs := a_old_carbs/100 * :P17_SET_WEIGHT;
     20  a_new_weight := :P17_SET_WEIGHT;
     21  ELSE
     22  a_new_kcal := a_old_kcal;
     23  a_new_carbs := a_old_carbs;
     24  a_new_weight := a_old_weight;
     25  END IF;
     26
     27  RETURN a_new_weight;
     28  RETURN a_new_carbs;
     29  return a_new_kcal;
     30* end;
    SQL> /
    kcal INTO a_old_kcal,
         *
    ERROR at line 12:
    ORA-06550: line 12, column 6:
    PL/SQL: ORA-00923: FROM keyword not found where expected
    ORA-06550: line 11, column 1:
    PL/SQL: SQL Statement ignored
    ORA-06550: line 17, column 11:
    PLS-00103: Encountered the symbol "=" when expecting one of the following:
    . ( * @ % & = - + < / > at in is mod remainder not rem then
     <> or != or ~= >= <= <> and or like like2
    like4 likec between || multi set
    

    But I did not get out on how to display the results. So I thought to put the results in the elements, which appear here again in a region.

  • What I'm wondering is, how can I change my source code, in such a way that the return values will be inserted into existing already the elements on the page?

    That's what calculations are used to, but the docs say: + page calculations allows to assign a value to one point identified when a page is presented or displayed. + which is a unique value to a single page or a part of the application.

    It's my source code of calculation:

    Always zip code wrapped in the tags\

    ...\
    

    Tags to preserve formatting and special characters.

    DECLARE
    a_unit varchar2 (20);
    float a_old_kcal;
    float a_new_kcal;
    float a_old_carbs;
    float a_new_carbs;
    float a_old_weight;
    float a_new_weight;

    BEGIN
    SELECT standardamount INTO a_old_weight,
    kcal IN a_old_kcal,
    carbohydrates IN a_old_carbs,
    name IN a_unit

    INTO appears only once in the SELECT... IN State.

    OF foodunit
    WHERE foodunit.foodunitid =: P17_SET_UNIT;
    IF a_unit: = "gram" THEN
    a_new_kcal: a_old_kcal/100 = *: P17_SET_WEIGHT; *
    a_new_carbs: a_old_carbs/100 = *: P17_SET_WEIGHT; *
    a_new_weight: =: P17_SET_WEIGHT;
    ON THE OTHER
    a_new_kcal: = a_old_kcal;
    a_new_carbs: = a_old_carbs;
    a_new_weight: = a_old_weight;
    END IF;

    RETURN a_new_weight;
    RETURN a_new_carbs;
    RETURN a_new_kcal;
    END;

    Several RETURN statements like that just won't work. Such code compiles but should generate a warning about an unreachable code.

    I want it back a_new_weight, a_new_carbs, and a_new_kcal as elements. I made the items named P17_NEW_WEIGHT, P17_NEW_CARBS, and P17_NEW_KCAL already, and my plan is to insert a_new_weight values in P17_NEW_WEIGHT and so on.

    How can I change the source code of my calculation so that it will insert these values in the above?

    You try to calculate values for the 3 elements, so you can use 3 calculations, but as the calculations are related and based on the results of a query that you do not want to repeat, doing this using a process is a better idea.

    You must delete the calculation and create a process page, using good SELECT... IN the syntax, which assigns values to page elements by using the standard bind variables syntax, for example

    :P17_NEW_KCAL := a_old_kcal/100 * :P17_SET_WEIGHT;
    
  • You insert a value use to_timestamp()?

    Hi all

    I encountered a problem:
    I used the chain as ' INSERT INTO VALUES TABLE_A (TO_TIMESTAMP ('2012-02-15 12:21:23.23 ',' YYYY-MM-DD HH24:MI:SS.)). FF')); COMMIT; ».

    TimesTen reported: TT0805: TO_TIMESTAMP has not been implemented.

    How can I use the to_timestamp() or any other function?

    Hi Raul,

    TimesTen doesn't have function TO_TIMESTEN.
    The datetime functions are as follows:
    ADD_MONTHS
    EXTRACT
    MONTHS_BETWEEN
    NUMTODSINTERVAL
    NUMTOYMINTERVAL
    ROUND (Date)
    SYSDATE and GETDATE
    TIMESTAMPADD
    TIMESTAMPDIFF
    TO_DATE

    (http://docs.oracle.com/cd/E21901_01/doc/timesten.1122/e21642/function.htm#CACHGGIC)

    Kind regards
    Gennady

  • How to insert the value of table display

    Hi all

    I have a page element named that email and set this as view only, now I need to insert this value in the table I use insert statement like this: P255_EMAIL, but it gives an error.


    Can someone tell me how to insert this

    Thanks and greetings
    srikkanth. M

    Srikkanth,
    A single display element is not rendered at the point of entry to the difference of the other editable on the page elements, if you look at the html code of any view one item and compare it with a textfield should be clear.

    You can have another element hidden with the value that can be returned in the process
    OR

    Here's a little something that does not need any additional items to make the item view alone and still available in the world as a normal part

    Do not say P100_MY_ITEM like a textfield
    But in the text of element Pre_ give you

    <span class="display_only" >&P100_MY_ITEM.</span><span style="display:none">
    

    And in the text of item Post_ put

    </span>
    

    Hide the textfield object, it shows the value of the item as a single text to display.

  • Insert some values into the database of field boxes




    I had a similar probem and error when you use the drop-down list instead of a checkbox. It was solved by putting the SELECT name = "CarMake in the menu dropdown.

    But in the box, I don't know?
    I seem that the problem is the action page has the Form.carmake, but the page does not work. What Miss me and where should I put in the entry below page.


    The main objective is to have checked checkboxes to insert some values into the database field carmake based on what is checked.


    If the Honda checkbox is checked then
    It inserts into the carmake field value Honda.

    If the Toyota checkbox is checked then
    It inserts into the carmake field the value of Toyota.

    If both are true then 2 rows are inserted two values
    Honda and Toyota.

    Ditto for the last option.

    Thanks for your help


    Here's the error again

    error:
    Error occurred while processing request
    CARMAKE element is not defined in the FORM.

    12:21:50.050 - term Exception - in C:\CFusionMX7\wwwroot\Author\CarAddAction.cfm: line 16
    CARMAKE element is not defined in the FORM.

    line 16 is:
    "#Trim (Form.carmake), #
    Join the Code


    <! - Here is the form - >
    < html >
    < head >
    < / head >

    < body >


    < h1 > < / h1 >

    < table >
    < action = "CarAddAction.cfm cfform" method = "POST" > "
    < b >
    < td > Honda: < table >
    < td > < Center > < input type = "checkbox" name = "HONDA_MODEL" value = "HONDA" checked > < / center > < table >
    < /tr >
    < b >
    < td > Toyota: < table >
    < td > < Center > < input type = "checkbox" name = "Toyota_MODEL" value = "Toyota" Unchecked > < / center > < table >
    < /tr >
    < b >
    < td > SUBARU: < table >
    < td > < Center > < input type = "checkbox" name = "SUBARU_MODEL" value = "SUBARU" unchecked > < / center > < table >
    < /tr >



    < Tr > < td > < table > Honda model
    < td >
    < input type = "Text".
    name = "Honda_Model".
    Value =""
    size = "22".
    MaxLength = "20" >
    < table >
    < tr > < /tr >
    < Tr > < td > < table > Toyota model
    < td >
    < input type = "Text".
    name = "Toyota_Model".
    Value =""
    size = "22" >
    < table >
    < tr > < /tr >
    < Tr > < td > < table > Subaru model
    < td >
    < input type = "Text".
    name = "Subaru_Model".
    Value =""
    size = "22" >
    < table >
    < tr > < /tr >
    < td > < table >
    < td >
    < input type is 'submit' value is "Take Add to database" >
    < table >
    < /tr >

    < / cfform >
    < /table >

    < / body >
    < / html >



    <!-action page
    --------->
    < cfdump var = "#form #" >
    < name cfquery = "InsertCarInfo."
    DataSource = "#request. MainDSN #">"
    INSERT INTO Car_tab)
    car_Make,
    Honda_Model,
    Toyota_Model,
    Subaru_Model

    )
    VALUES)

    "#Trim (Form.carmake), #
    "#Trim (Form.Honda_Model), #
    "#Trim (Form.Toyota_Model), #
    "#Trim (Form.Subaru_Model) #
    )
    < / cfquery >

    You check in one or more of the boxes before continuing? Remember what I said about the form field box existing only on the page of treatment at least 1 or more checkboxes are checked on your form. Make sure you use to avoid this problem.

    What happens when you take a look at the output of your dump of form? Your fields are present?

  • Cannot insert the value with: in BLOB field

    I use Oracle 10 g Express Edition.
    Attempt to run this page of SQL commands insert:

    INSERT INTO table1 (col1, col2)
    VALUES ('one', '\"2.001:2372.002:002.005:Y2.018:G')


    News of table1:
    col1 = VARCHAR2 (25)
    col2 = BLOB

    When I click on run a tab enter the Variables is displayed?

    Why can't I insert the value directly in col2 without bind variable?

    Ah, just read your message.

    I'm guessing that because your on 10g Express Edition, you must be using the Application Express?

    Edit: Here's the forum to request:

    Oracle Application Express (APEX)

    Published by: BluShadow on September 3, 2009 14:05

  • Insert two value sequence fields

    HI: I currently have the following sequence that inserts the value of the sequence in a field called REQUEST_ID. How can I change this to insert the same value in another area as well?
    create trigger MNSVOICEASSETS_TRG
    before insert on MNSVOICEASSETS
    for each row
    begin
      if :new.REQUEST_ID is null then
        select MNSVOICEASSETS_SEQ.nextval into :new.REQUEST_ID from dual;
      end if;
    end;
    Thank you
    Ravi

    In fact, we know not if you want to assign another value of field if REQUEST_ID got the value of a sequence or without worrying. My suggestion was for the former. If you want to without worrying, assign it outside of the if statement

    create trigger MNSVOICEASSETS_TRG
    before insert on MNSVOICEASSETS
    for each row
    begin
      if :new.REQUEST_ID is null then
        select MNSVOICEASSETS_SEQ.nextval into :new.REQUEST_ID from dual;
      end if;
      :new.ANOTHER_FIELD_NAME := :new.REQUEST_ID;
    end;
    

    SY.

  • ultralitej exception when attempting to insert the value into the table

    Hello

    I get this exception,

    Here is my table

    Sub createItem()
    throws ULjException
    {
    TableSchema table_schema = _conn.createTable ('Item');
    Table_schema.createColumn ("item_code", Domain.VARCHAR, 15);
    Table_schema.createColumn ("item_desc", Domain.VARCHAR, 30);
    Table_schema.createColumn ("item_rate", Domain.INTEGER);
    IndexSchema pk_schema = table_schema.createPrimaryIndex ("prime_key");
    pk_schema. AddColumn ("item_code", IndexSchema.ASCENDING);
           
    IndexSchema name_index = table_schema.createIndex ('ItemName');
    name_index. AddColumn ("item_desc", IndexSchema.ASCENDING);
    }

    I'm trying this option to enter the values in it.

    for (int i = 0; i)<>
    {
    dataAccess.insertItem (str_pCode [i], str_pDesc [i], str_pRate [i]);
    }

    Here is my code insertItem

    Insert data
    {} public insertItem Sub (string code, string desc, string rate)
    try {}
    String sql = "INSERT INTO point (item_code, item_desc, item_rate) VALUES (?,?,?)";
    PreparedStatement ps = _conn.prepareStatement (sql);

    PS. Set (code 1);
    PS. Set (2, desc);
    PS. Set (3, rate);

    PS. Execute();
    _conn.commit (); }
    {} catch (ULjException uex)
    System.out.println ("ULjException:"+ uex.toString () ');
    }
    catch (Exception ex) {}
    System.out.println ("Exception:"+ ex.toString () ');
    }
    }

    and I'm getting the following exception.

    Exception: ianywhere.ultralitej.implementation.JrException: error-[141] UltraLiteJ: table 'employee '.

    Check which line of code is throwing the exception. Look for the error on the UltraliteJ document number.

  • table col name get the details of the table column and inserting of values depending on the data type of the column

    Hello

    I am train to write a procedure where I would spend the table as a parameter name and then the code would determine it is column names, and then he would insert records in each column depending on the data type. could someone help me with this.

    Thank you

    SM

    Hello

    Perhaps you need to dummy data just for the table.

    Here is my exercise

    create or replace
    procedure generate_rows(p_table_name varchar2, p_count number)
    is
      --
      function insert_statement(p_table_name varchar2) return clob
      is
        l_columns clob;
        l_expressions clob;
        l_sql clob default
          'insert into p_table_name (l_columns) select l_expressions from dual connect by level <= :p_count';
      begin
        select
          -- l_columns
          listagg(lower(column_name), ',') within group (order by column_id),
          -- l_expressions
          listagg(
            case
            when data_type = 'DATE'
              then  'sysdate'
            when data_type like 'TIMESTAMP%'
              then  'systimestamp'
            when data_type = 'NUMBER'
              then  replace('dbms_random.value(1,max)',
                      'max', nvl(data_precision - data_scale, data_length)
                    )
            when data_type = 'VARCHAR2'
              then  replace(q'|dbms_random.string('a',data_length)|',
                      'data_length', data_length
                    )
            else
                    'NULL'
            end, ',') within group (order by column_id)
        into
          l_columns,
          l_expressions
        from user_tab_columns
        where table_name = upper(p_table_name);
        --
        l_sql := replace(replace(replace(l_sql,
          'p_table_name', p_table_name),
          'l_columns', l_columns),
          'l_expressions', l_expressions);
        -- debug
        dbms_output.put_line(l_sql);
        --
        return l_sql;
      end;
    begin
      execute immediate insert_statement(p_table_name) using p_count;
    end;
    /
    
    -- test
    create table mytable(
      id number(4,0),
      txt varchar2(10),
      tstz timestamp with time zone,
      dt date,
      xml clob
    )
    ;
    set serveroutput on
    exec generate_rows('mytable', 10);
    select id, txt from mytable
    ;
    drop procedure generate_rows
    ;
    drop table mytable purge
    ;
    
    Procedure GENERATE_ROWS compiled
    Table MYTABLE created.
    PL/SQL procedure successfully completed.
    
    insert into mytable (id,txt,tstz,dt,xml) select dbms_random.value(1,4),dbms_random.string('a',10),systimestamp,sysdate,NULL from dual connect by level <= :p_count
            ID TXT
    ---------- ----------
             3 WnSbyiZRkC
             2 UddzkhktLf
             1 zwfWigHxUp
             2 VlUMPHHotN
             3 adGCKDeokj
             3 CKAHGfuHAY
             2 pqsHrVeHwF
             3 FypZMVshxs
             3 WtbsJPHMDC
             3 TlxYoKbuWp
    
    10 rows selected
    
    Procedure GENERATE_ROWS dropped.
    Table MYTABLE dropped.
    

    and here is the vision of Tom Kyte for the same https://asktom.oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:2151576678914

    Edit: to improve my code, it must use p_count as bind as Tom.

Maybe you are looking for

  • Failures of SMS to the network in New Zealand 2degrees

    The New Zealand 2Degrees network SMS are not delivered to the recipient. My Skype credit goes down whenever I have send a message but the message is never through. I tried to send SMS my number so I know for some it does not work properly. With Skype

  • Is PCI6513 supports the replay?

    Is PCI6513 supports playback of channels values? How will I know if the collating of channel is available for some module?

  • Constant change of look, feel and action of the MS software

    Is it my imagination or Microsoft changing the look , the feel and action of older versions of their programs and the operating system on my computer Win XP 6 years?  In the automatic updates, I had 'ask me first' checked for years.  Yet things keep

  • How to set a list as a header item type?

    I use a QVariantListDataModel. QVariantMap map = QVariantMap(); dataModel.clear(); map["title"] = resultList.value(id).toMap().value("QUESTION").value(); dataModel

  • Cannot run Hello world on v4.2

    Hello I have just installed JDE v4.2, responsible for the sample workspace, set Hello World as only active project and he ran. The Simulator loaded fine, but when I try to run it, I get a MissingResourceException. Com.rim.samples.device.resource.Hell