Insert multiple rows in a database

Hello
I worked on a project that takes a JMS queue xml document and inserts the data into db. But the problem here is that there may be any number of data sets. I use EPCO for my work, but no matter what I do, the data is not simply inserted. Could you any body please help me? Here is an example of the message that I'm trying to insert as the XSD for the JCA and entry documents.

XSD for JMS Message:

<? XML version = "1.0" encoding = "windows-1252"? >
< xsd: Schema container = "http://www.w3.org/2001/XMLSchema".
xmlns = "http://www.example.org".
targetNamespace = "http://www.example.org".
elementFormDefault = "qualified" >
< xsd: element name = "canonical" >
< xsd: complexType >
< xsd: SEQUENCE >
< xsd: element name = "order" >
< xsd: complexType >
< xsd: SEQUENCE >
< xsd: element name = "data" maxOccurs = "unbounded" >
< xsd: complexType >
< xsd: SEQUENCE >
< xsd: element name = "rowCode" type = "xsd: String" / >
< xsd: element name = "productNumber" type = "xsd: String" / >
< xsd: element name = "attributeType" type = "xsd: String" / >
< xsd: element name = "attributeCode" type = "xsd: String" / >
< xsd: element name = "transactionType" type = "xsd: String" / >
< xsd: element name = "timestamp" type = "xsd: DateTime" / >
< / xsd: SEQUENCE >
< / xsd: complexType >
< / xsd: element >
< / xsd: SEQUENCE >
< / xsd: complexType >
< / xsd: element >
< / xsd: Schema >


JCA XSD:

<? XML version = "1.0" encoding = "UTF - 8"? >
< xs: Schema targetNamespace = "http://xmlns.oracle.com/pcbpel/adapter/db/top/InsertData" xmlns = "http://xmlns.oracle.com/pcbpel/adapter/db/top/InsertData" elementFormDefault = "qualified" attributeFormDefault = "qualified" xmlns: XS = "http://www.w3.org/2001/XMLSchema" >
< xs: element name = "OrderDataCollection" type = "OrderDataCollection" / >
< name XS: complexType = "OrderDataCollection" >
< xs: SEQUENCE >
< xs: element name = "OrderData" type = "OrderData" minOccurs = "0" maxOccurs = "unbounded" / >
< / xs: SEQUENCE >
< / xs: complexType >
< name XS: complexType 'OrderData' = >
< xs: SEQUENCE >
< xs: element name = "prodnum" type = "xs: Decimal" / >
< xs: element name = 'attrtype"minOccurs ="0"nillable ="true">
< xs:simpleType >
< xs:restriction base = "XS: String" >
< xs:maxLength value = "20" / >
< / xs:restriction >
< / xs:simpleType >
< / xs: element >
< xs: element name = "attrcode" minOccurs = "0" nillable = "true" >
< xs:simpleType >
< xs:restriction base = "XS: String" >
< xs:maxLength value = "10" / >
< / xs:restriction >
< / xs:simpleType >
< / xs: element >
< xs: element name = "transtype" minOccurs = "0" nillable = "true" >
< xs:simpleType >
< xs:restriction base = "XS: String" >
< xs:maxLength value = "1" / >
< / xs:restriction >
< / xs:simpleType >
< / xs: element >
< xs: element name = "ordertime" type = "xs: DateTime" minOccurs = "0" nillable = "true" / >
< / xs: SEQUENCE >
< / xs: complexType >
< / xs: Schema >

Input samples:

<? XML version = "1.0" encoding = "windows-1252"? >
< ProductData >
< header >
< rowCode >: < / rowCode >
< interfaceCode > H6D9J7 < / interfaceCode >
< createdOn >
< date >
< year > 2011 < / year >
< month > 05 < / month >
< day > 23 < / day >
< / date >
< time >
< time > 02 < / time >
< minute > 05 < / minute >
< seconds > 11 < / seconds >
< / time >
< / createdOn >
< description > Front Shop of the attributes of FMS to JDA PMM < / description >
< / header >
< body >
< data >
< rowCode > D < / rowCode >
< other > 0004567 < / productNumber >
< attributeType > MIMI < / attributeType >
< attributeCode > CCCCCCCjjj < / attributeCode >
< transactionType > A < / transactionType >
< timestamp >
< date >
< year > 2011 < / year >
< month > 02 < / month >
< day > 19 < / day >
< / date >
< time >
< time > 02 < / time >
< minute > 05 < / minute >
< seconds > 11 < / seconds >
< / time >
< / timestamp >
< / data >
< data >
< rowCode > D < / rowCode >
< other > 0004567 < / productNumber >
< attributeType > TTTTTT2 < / attributeType >
< attributeCode > CCCCCCjjj2 < / attributeCode >
< transactionType > A < / transactionType >
< timestamp >
< date >
< year > 2011 < / year >
< month > 02 < / month >
< day > 19 < / day >
< / date >
< time >
< time > 02 < / time >
< minute > 05 < / minute >
< seconds > 11 < / seconds >
< / time >
< / timestamp >
< / data >
< / body >
<>footer
< rowCode > Z < / rowCode >
< interfaceCode > H6D9J7 < / interfaceCode >
< numberOfRows > 000000000002 < / numberOfRows >
< / footer >
< / ProductData >

I will be really grateful if someone can help me. Thank you.

Check below link it may help you

How to insert multiple records using the single DB adapter

Thank you
AJ

Tags: Fusion Middleware

Similar Questions

  • Insert multiple records in a database using the DB adapter and stored procedure

    Hi all

    I want to insert multiple records in a database using a stored procedure. I wanted to insert these records using a data adapter and data adapter must be called by a mediator.

    Can anyone suggest me some ideas if it's possible with capabtilities OOB in SOA suite or not?

    Thank you for your help in advance.

    Thank you
    Shiv

    The trick is in the stored procedure. You must use a data type that will handle multiple records I use varray. An example can be found in this post.

    Re: Mutiple calls to AppsAdapter (pl/sql) when the payload has multiple records

    When you read the procedure stored in the db adapter wizard looks and xsd / xml if you have maps accordingly.

    see you soon
    James

  • How to insert multiple rows in a table by the user (pl/sql)

    Hello
    I was trying to insert several rows in a table by a user by some pl/sql, but not every time entry. :/
    What is happening is that the program requires each time ask the user for the new value but the loop
    1 values inserts actually four times (the loop is run four times). can any point on what I am
    doing wrong or solutions will be fun ;)

    what I wrote here

    ---------------------------------

    Set serveroutput on
    set verify off

    declare

    EmpNo number;
    EmpName varchar2 (20);

    Start

    because loop me in 1.4
    EmpNo: = & empno;
    EmpName: = '& empname';

    insert into values(empno,empname) of the employee;

    end loop;

    end;

    -------------------------------

    do not laugh at my code, I'm new to this oracle :D

    Thank you, prospects for the future for a response

    user13371438 wrote:
    Thanks for the info, looks like a nice tool will ;) try
    but I really want (my problem) in pl/sql

    Take a quick re-read my post above.

    PL/SQL is a process running on the database server. This process cannot interact with the client computer. He can't ask for user input, and it cannot display the output to the client. Client interface tools can only do. You are eager to get feedback from a user, if you need an interface tool to do. SQL * Plus can interface and application of entry, but only as variable substition, and it does not really provide a programming construct that allows you to run a program in a loop to do. Do this using SQL * Plus you must pair it with shell/dos scripting languages, but more ideally you should use an interface appropriate as Apex.

    I was wondering if it all works in pl/sql to release cached data (as fflush (stdin) in c ++)

    PL/SQL does not a customer entry, so there is no sense to have something to release the cached data. You pass the values of PL/SQL code using procedures or functions with parameters.

  • Inserting multiple rows - need help

    Hi all

    I need to insert several rows in the table with a single query, and the number of lines is 269470.
    Here one of the columns is determined by another sub query that returns multilple lines and the other 2 columns remain same for all.

    I came up with the following query, but need a loop to turn several times (269470 times).

    insert into EMLUSRRECV
    (user_id, storeent_id, receiveml)
    values
    (+ (select user_id from users including the user_id not in (select distinct user_id of EMLUSRRECV) and CURR = 'USD' and rownum = 1) +, 11154, 1);

    Thanks in advance.

    And how did you think of sql developer can help you with that?

    Why don't mark you this question ANSWER and post in the forum SQL and PL/SQL.
    SQL and PL/SQL

  • Inserting multiple rows programmatically received the unique key error

    I'm developing an application using ADF BC (JDev 11.1.1.5) ADF.

    I have a table with the attributes (id, tpId, trId) where tpId is in reference to the primary key of the table tp and trId is in reference to the primary key of the table tr. The combination of tpId and trId should be unique to table A.

    I wrote the following codes in my bean to create multiple records (from selections on a page of the user interface that allows users to select tables tp and tr).

    CCPC DCBindingContainer = getDCBindingContainer();
    DCIteratorBinding iter = dcbc.findIteratorBinding("AVO1Iterator");
    RowSetIterator rsi = iter.getRowSetIterator ();
    for (int x = 0; x < selectedRowCount; x ++) {}
    Line myRow = rsi.createRow ();
    myRow.setAttribute ("Tpid", tpRowId [x]);
    myRow.setAttribute ("Trid", trId);
    myRow.setNewRowState (Row.STATUS_NEW);
    rsi.closeRowSetIterator ();
    try {}
    System.out.println ("insert:" + myRow.getAttribute ("Tpid") + "," + myRow.getAttribute ("Trid"));
    dcbc.getDataControl () .commitTransaction ();
    created ++;
    } catch (Exception e) {}
    System.out.println ("insert:" + myRow.getAttribute ("Tpid") + "," + myRow.getAttribute ("Trid"));
    System.out.println (e.getMessage ());
    DUPS ++;
    }
    }

    Unfortunately, I get the following error:

    Insertion: 535, 48
    Failed: 535, 48
    Houston-26048: constraint 'A_UK1' is violated during the operation "Insert" post with SQL statement ' BEGIN INSERT INTO A(ID,TPID,TRID) VALUES (: 1,: 2:3) in RETURNING ID, TRID INTO: 15,: 16; END; ».
    Insertion: 537, 48
    Failed: 537, 48
    and so on...

    I check the database, there is no record at all thanks to the combination.

    Did anyone here see the rub on my codes?

    The framework works as expected. If you try to insert a key duplicated at once, you must clear the error before you can continue. In your case, you can use a rollback on the transaction to clear the error.
    Another thing that seems strange to me is that you do not set the id of the new line, which is without doubt the pharmacokinetics of the of the line.

    Timo

  • inserting multiple rows of another table with incremented recordid

    Hi all

    I HAVE TWO TABLES:

    CREATE TABLE TEMP_TEST1)
    NUMBER OF RECID,
    TESTCHAR VARCHAR2 (500)
    )

    AND

    CREATE TABLE TEMP_TEST2)
    TESTCHAR VARCHAR2 (500)
    )

    Both the table contains data in it. I want to insert data from TEMP_TEST2 in TEMP_TEST1 with RECID incremented for each record, which must be greater than max (RECID) of TEMP_TEST1.
    PS: I have to query insert only, I cannot make changes in the structure of table or RECID of TEMP_TEST1 is not automatically incremented.
    Please suggest a query that selects the record of TEMP_TEST2 and TEMP_TEST1 insert with recid incremented for each record.


    Thank you.
    SQL> insert into TEMP_TEST2(TESTCHAR)
      2  select 'Test'||level from dual connect by level < 10
      3  /
    
    9 rows created.
    
    SQL>
    SQL>
    SQL> insert into TEMP_TEST1(RECID,TESTCHAR)
      2  select (select nvl(max(RECID),0) from TEMP_TEST1) + rownum, t2.TESTCHAR
      3  from TEMP_TEST2 t2
      4  /
    
    9 rows created.
    
    SQL>
    SQL> select * from TEMP_TEST1
      2  /
    
         RECID TESTCHAR
    ---------- ----------
             1 Test1
             2 Test2
             3 Test3
             4 Test4
             5 Test5
             6 Test6
             7 Test7
             8 Test8
             9 Test9
    
    9 rows selected.
    
    SQL> insert into TEMP_TEST1(RECID,TESTCHAR)
      2  select (select nvl(max(RECID),0) from TEMP_TEST1) + rownum, t2.TESTCHAR
      3  from TEMP_TEST2 t2
      4  /
    
    9 rows created.
    
    SQL>
    SQL> select * from TEMP_TEST1
      2  /
    
         RECID TESTCHAR
    ---------- ----------
             1 Test1
             2 Test2
             3 Test3
             4 Test4
             5 Test5
             6 Test6
             7 Test7
             8 Test8
             9 Test9
            10 Test1
            11 Test2
    
         RECID TESTCHAR
    ---------- ----------
            12 Test3
            13 Test4
            14 Test5
            15 Test6
            16 Test7
            17 Test8
            18 Test9
    
    18 rows selected.
    
    SQL>
    

    Good bye
    DPT

  • Inserting multiple rows

    Is it possible to insert a number of rows in a table based on a value entered in a textbox? For example (I'm a tech writer not a programmer/engineer, so please be patient with me.), if someone enters "4" in a textbox, can I insert a large number of number of lines?

    Thank you!

    -Tom

    Who did jdeline. Thank you!

  • Calendar - insert multiple records by account number/length of

    Hello

    I would write a process allowing to insert multiple rows in a table. I think it should be a LOOP statement, but I don't know how in the APEX.

    I got a simple form with the following page:

    P2_Calendar_ID-> hidden field, populated by standard processes to Get PK to generate IDS again for the insert statement

    P2_Name-> text field

    P2_Date-> Date picker field

    P2_Duration-> numeric field

    The user name (P2_Name), choose a date (P2_Date) and type in a number (P2_Duration) and send the form. Here, I need the above mentioned process of pl/sql.

    I think that first of all it must be created a loop to generate the Dates of the picked a (P2_Date) and increment the date by the number (P2_Duration), and store dates in the variable. Then there should be another loop to insert the number of records in a table, so it has inserted the same number of rows depending on the number in P2_Duration and with the dates increment according to the P2_Duration.

    Name of the CALENDAR table after columns:

    Calendar_ID-> number)

    Name-> varchar2

    Date-> Date

    Example of what the user will fill in the form above:

    P2_Name-> Vladimir

    P2_Date-> may 9, 2014

    P2_Duration-> 3

    It must be created the following lines in a table CALENDAR:

    Date name Calendar_ID

    1 Vladimir may 9, 2014

    2 Vladimir 10 may 2014

    3 Vladimir may 11, 2014

    Of course the Calendar_ID is generated by the standard Get PK process, which might need to be included in the loop... I think so.

    Thank you for your help.

    Best regards

    Vladimir

    PS: I use the APEX Version: Application Express 4.2.5.00.08

    Hi Vladimir,.

    Simply create a process on submit more info here: 8.5 Page understanding the process , with your touch as a trigger and add the code in this document, similar to the below I would say: and you can just get rid of the hidden element calendar_id

    Thank you

    DECLARE

    DATE OF T_DATE;

    BEGIN

    FOR DATEINC IN 0.TO_NUMBER(:P2_DURATION) - 1 LOOP

    T_DATE: = TO_DATE(:P2_DATE,'DD-MON-YYYY') + DATEINC;

    INSERT INTO CALENDAR (CALENDAR_ID, NAME, DATE) VALUES (CAL_ID_SEQ.nextval,: P2_NAME, T_DATE);

    END loop;

    END;

  • Insert multiple records in a form with checkboxes

    Hello

    I need to insert multiple records in a database of a form using Coldfusion and am stuck - it works correctly when inserting one record at a time. Basically, the user will choose their name of the employee (EmployeeID) in a dynamic list, then several session (open) numbers that represent classes of training.

    When I try and select several check boxes, I get this error:
    "The number of query values and destination fields is not the same."

    The boxes of the open field are not dynamic, as you can see-how use CFLOOP or any other method to allow several checkboxes be selected, and all open documents is entered into the database on a form?

    I used server behaviors Dreamweaver 8 to create the form - which is limiting I know but I'm not a coder. I hope I can add code here to do things correctly function.



    ----APPLICATION CODE------------------------------------------------------------------

    <!-get employee names->
    < cfquery name = "rsDisplayEmployee" datasource = "FormationRH" >
    SELECT *.
    OF tblEmployees
    ORDER BY LastName ASC < / cfquery >
    <!-->-->
    <! - insert Records - >
    < cfset CurrentPage = GetFileFromPath (GetTemplatePath ()) >
    < cfif IsDefined "(FORM. MM_InsertRecord") AND the FORM. MM_InsertRecord EQ 'form1' >
    < cfquery datasource = "FormationRH" >
    INSERT INTO tblEnrollments (open, EmployeeID)
    VALUES)
    < cfif IsDefined "(FORM. Open") AND #FORM. Open # NEQ "" > "".
    #FORM. Open #.
    < cfelse >
    NULL VALUE
    < / cfif >
    ,
    < cfif IsDefined "(FORM. EmployeeID") AND #FORM. EmployeeID # NEQ "" > "".
    #FORM. EmployeeID #.
    < cfelse >
    NULL VALUE
    < / cfif >
    ) < / cfquery >
    < cflocation url = "2.cfm" >
    < / cfif >
    <!-->-->

    --------FORM CODE-----------------------------------------------------------------------

    < form action = "" < cfoutput > #CurrentPage # < / cfoutput > "id = 'form' name ="form"method ="POST">"
    < table width = "100%" border = "0" cellspacing = "0" cellpadding = "4" >
    < b >
    < td width = "100%" > < h2 > < strong > select an employee name < facilities > < / h2 > < table >
    < /tr >
    < b >
    < td > < select name = "EmployeeID" >
    < cfoutput query = "rsDisplayEmployee" >
    < option value = "#rsDisplayEmployee.EmployeeID #" > #rsDisplayEmployee.LastName #, #rsDisplayEmployee.FirstName # < / option >
    < / cfoutput >
    < / select > < table >
    < /tr >
    < /table >
    < h2 > < strong > select training class < facilities > < / h2 >
    < table width = "600" border = "0" cellspacing = "0" cellpadding = "0" >
    < b >
    < td width = "227" valign = "top" > class < table >
    < td width = "373" valign = "top" > < input name = "Open" type = "checkbox" value = "937" / >
    Date < table >
    < /tr >
    < b >
    < td valign = "top" > class < table >
    < td valign = "top" > < label >
    < input name = "Open" type = "checkbox" value = "936" / >
    < / label >
    Date < table >
    < /tr >
    < /table >
    < br / >
    < input type = "submit" name = "Submit" value = 'Sign Up!' / >
    < input type = "hidden" name = "MM_InsertRecord" value = "form" >
    < / make >

    "Add a line" I want to say that, for each of the checkboxes selected in your form, the code will be to insert a new record in the database table. Sorry I probably didn't phrase it very well.

    so, no, the code does not need to wrap around each element. Instead the code examines the form.fieldnames variable (form.fieldnames, which is a list separated by commas of all fields defined in the form, is automatically submitted to each form submission - you don't have to define yourself somehow) and for each selected checkbox will insert a new record in your table with the check box selected and selected value the value of the id of the employee.

  • Insert several rows in the data table table

    Hi all

    I have a requirement as to insert multiple rows in the table for this table data only (I need to replicate the data).
    In this table, the primary key is a composite primary key with all the keys.primary foreign key and the foreign key to the Date. I need to change that date to the insertion.


    INSERT
    IN myschema. Fact_page_performance
    (
    time_sk,
    Batch_ID,
    delta_msec,
    delta_user_msec,
    error_code_sk,
    content_errs,
    element_count,
    page_bytes,
    Available,.
    date_sk

    )
    VALUES
    (SELECT time_sk,
    Batch_ID,
    delta_msec,
    delta_user_msec,
    error_code_sk,
    content_errs,
    element_count,
    page_bytes,
    Available
    OF myschema. FACT_PAGE_PERFORMANCE_BACKUP
    WHERE date_sk = 20090509, 20090510
    );

    But it gives error like missing expression.
    Could someone please help me.

    Thanks and greetings
    Swetha.

    You can have either the VALUES or not SELECT the two

    INSERT
    INTO myschema.Fact_page_performance
    (
    time_sk ,
    batch_id ,
    delta_msec ,
    delta_user_msec,
    error_code_sk ,
    content_errs ,
    element_count ,
    page_bytes ,
    Available ,
    date_sk
    
    )
    SELECT time_sk ,
    batch_id ,
    delta_msec ,
    delta_user_msec,
    error_code_sk ,
    content_errs ,
    element_count ,
    page_bytes ,
    Available
    FROM myschema.FACT_PAGE_PERFORMANCE_BACKUP
    WHERE date_sk=20090509,20090510;
    
  • How to insert a row into the table from an entity class

    I use JDeveloper 11.1.2.3.0 using ADF.  I would like to insert a row in Table B, when A table is inserted into the database based on a value selected by the end user.  I could do in a database trigger, but I would try in the ADF. I think that the best place to do it would be in the entity based on the table A class. I could override the doDML method and search for DML_INSERT

    and make the table insert B here, but I don't know the best way to achieve this.  I guess I want to avoid using a SQL "insert". I'm new to ADF and it can be difficult to get

    a question using the appropriate terminology. I hope this makes sense.

    Hello

    Check out this blog: http://andrejusb.blogspot.com/2008/02/complex-insert-in-easy-way.html

    Arun-

  • Could not use DB function call to insert a row into a table OBIEE

    Hello

    At the prompt of the OBIEE report, I create a DB function in a variable column of the guest, so whenever I'm in the dropdown variable ob column call the function DB call.

    The function call is insert a row into a table in the database. However, it seems impossible to insert the row into the table.

    I have test the function in the sqlplus and it works, if the function has no problem. The problem is OBIEE failed to insert something in the datebase, it can only read from it.

    Any ideas on how I could fix it?

    Thank you!

    Hello
    Use your Evaluate function and the variable correctly. In the case where u called this function evaluate in the report in a column, and he has 100 files it contains, it will call db 100 times.

    Kind regards
    Anitha.B

  • How to insert multiple lines using a single query

    Hi all

    How to insert multiple lines using a single query to the emp table?
    I have the number of rows to insert into table x. consumes a lot of time. I tried to insert several lines using a single query, but get errors. I know exactly the query to do this.


    Thank you
    Sunil

    Like this?

    SQL> create table test(id number , dt date);
    
    Table created.
    
    SQL> insert into test values(&a,&b);
    Enter value for a: 1   --- It asked me and I entered 1
    Enter value for b: sysdate  --- It asked me and I entered sysdate
    old   1: insert into test values(&a,&b)
    new   1: insert into test values(1,sysdate)
    
    1 row created.
    
    SQL> 
    

    g.

  • Insert multiple records in the single form

    Hi all

    I met already insert many rows into a table using ADF BC. The solution is in the following thread

    Re: How to create several new lines in the Table of the ADF?

    However,.
    The above solution is useful when you want to enter new values as well as all the table entries is displayed.
    What can I do if I don't want all values in the table, but just a page 'AddEntries' where I can only add new lines without going through the table entries is displayed.

    As,

    Say a form has 5 rows

    Each line has empId, eMailSlNo, send attributes

    EmpId is the same for all 5 recordings but emailId is different.

    EmpId eMailSlNo plus the PK.

    empId generated by the sequence.

    Now, on presentation of the form, I want all five records to be inserted.

    (can I use ADF form instead of the table of the ADF for the ViewObject in this case. I tried ADF form but I could only insert 1 plug at the same time).

    I use 10.1.3.4

    Help, please.

    Thanks in advance,
    Shri

    Published by: newtoOTN on December 29, 2009 18:02

    Shri salvation,

    ADF form is intended for the single insert/update. For multiple insert/update/delete using the collection as table UI is preferred. I guess your db table or table design INTERFACE default (in my opinion but I do not know your usecase entirely, so I guess might b wrong).

    I would say,

    -make EmpId as PK
    -have another table to store EmpId (foreign key), emailSiNo, email
    -Having the relationship of the master / detail between the British Colombia ADF db tables.
    -Create master / detail UI and on the selection of the master, view the details and if no record is found does not add files and commit.

    See these examples:
    http://www.Oracle.com/technology/products/jdev/tips/Mills/MasterDetailSync/Master_Detail_Synchronization_in_ADF_Faces.html
    http://andrejusb.blogspot.com/2007/06/create-edit-and-delete-operations-in.html

    Hope it makes sense.

    ~ K

  • 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?

Maybe you are looking for