Shuttle - how can I insert data in database from second part of shuttle ?

I have read it: http://apex.oracle.com/pls/otn/f?p=35253:1:2820687553996558::NO but I don't understand shuttle.
My shuttle name is 'P3_SHUTTLE'. I have created shuttle by clicking (Create Item -> Shuttle -> next -> etc.). In first part of shuttle I have all elements from some table in database. In second part of shuttle I have choiced elements from first part of shuttle (as in each normal simply shuttle). I would like insert elements from second part of shuttle when somebody clicked button (which I have created). I have created process for this button type PL/SQL anonymous block. In field source of this process I have written:
DECLARE
BEGIN
FOR z in 1..htmldb_application.g_f02.count loop
INSERT INTO books(id_book) VALUES(htmldb_application.g_f02(z));
END LOOP;
END;
but it doesn't work (I don't know what is 'htmldb_application.g_f02.count' - it was in yours example).
So I have tried:
DECLARE
BEGIN
FOR z in 1..P3_SHUTTLE.pSQL_2.count loop
INSERT INTO books(id_book) VALUES(P3_AKTORZY.pSQL_2(z));
END LOOP;
END;
P3_SHUTTLE it is name of my shuttle
but this code also doesn't work :( HELP please :(
Edited by: user10728391 on 2008-12-19 01:17
Edited by: user10728391 on 2008-12-19 01:18

I have APEX 3.1.2.
I have tried:
DECLARE
l_selected HTMLDB_APPLICATION_GLOBAL.VC_ARR2;
BEGIN
l_selected := HTMLDB_UTIL.STRING_TO_TABLE(HTMLDB_APPLICATION.G_F02(1));
FOR I IN 1..l_selected.count
LOOP
INSERT INTO BOOKS (ID_BOOK) VALUES (l_selected(I));
END LOOP;
END;
It doesn't work. I have and error: 'No data found'. But you have written about name attribute. In view of code my page with shuttle I have that code about second part of shuttle:
<td class="shuttleSelect2">
<select multiple="multiple" name="p_v03" size="10" id="P3_SHUTTLE_RIGHT" ondblclick="g_Shuttlep_v03.remove()">
<option value="5">Aaa Aaa</option>
<option value="2">Bbb Bbb</option>
<option value="1">Eee Eee</option>
</select>
</td>
So I have tried in above code use: HTMLDB_APPLICATION.G_p_v03 and HTMLDB_APPLICATION.p_v03 but I have an error:
'G_P_V03' must be declared or 'P_V03' must be declared :(
Edited by: user10728391 on 2008-12-19 02:35

Similar Messages

  • How can i insert data into DB from my page programatically in Oracle ADF..?

    Hai, this is praveen.
    I have created  an EO and VO, when i have inserted data by dragging and dropping from DataControl -->Operations-->Create. I have successfully inserting data. But how can i do it programatically. What are the pre-defined steps that i can use over there to insert data into table programatically. Could u plz help me?

    Hi,
    You have to create an action Listener in the bean for any button.
    Then call an AM method.
    In that you have to do the following
    ViewObject yourVO = getYourVO();
    Row r = yourVo.createRow();
    r.setAttribute("Column1", value1); //the name of column should be as it is in your vo attribute.
    yourVO.insertRow(r);
    this.getDbTransaction().commit();
    Thanks

  • Insert data in database from FAT file

    how can i insert data in database in different different column

    I have APEX 3.1.2.
    I have tried:
    DECLARE
    l_selected HTMLDB_APPLICATION_GLOBAL.VC_ARR2;
    BEGIN
    l_selected := HTMLDB_UTIL.STRING_TO_TABLE(HTMLDB_APPLICATION.G_F02(1));
    FOR I IN 1..l_selected.count
    LOOP
    INSERT INTO BOOKS (ID_BOOK) VALUES (l_selected(I));
    END LOOP;
    END;
    It doesn't work. I have and error: 'No data found'. But you have written about name attribute. In view of code my page with shuttle I have that code about second part of shuttle:
    <td class="shuttleSelect2">
    <select multiple="multiple" name="p_v03" size="10" id="P3_SHUTTLE_RIGHT" ondblclick="g_Shuttlep_v03.remove()">
    <option value="5">Aaa Aaa</option>
    <option value="2">Bbb Bbb</option>
    <option value="1">Eee Eee</option>
    </select>
    </td>
    So I have tried in above code use: HTMLDB_APPLICATION.G_p_v03 and HTMLDB_APPLICATION.p_v03 but I have an error:
    'G_P_V03' must be declared or 'P_V03' must be declared :(
    Edited by: user10728391 on 2008-12-19 02:35

  • In ADF how can i insert data in multiple table if they have foreign key

    I have started working on ADF and can anybody inform me in ADF how can i insert data in multiple table if they have foreign key,please?
    Thnak you very much.

    Hello,
    Still no luck.I am surely doing silly mistakes.Anyway,Here are my workings-
    1> student_mst (id(pk),studentname) and student_guard_mst(id(fk),guardianname)
    2> created EO from both of the tables,made id in both EO as DBSequence and an association was also generated.
    3> i made that association composite by clicking the checkbox
    4> i created 2 VO from 2 EO.
    5> put those VO in Application Module.
    6> dragged and dropped 2 VO on my jspx page and dropped them as ADF Form.
    Now what to do please?

  • How can I connect to a database from ipaq with cldc??

    how can I connect to a database from ipaq with cldc??

    Hi Again
    There is a library by Mimer which allows you do connect to a Mimer SQL Server, don't know must about it, but here is a link.
    http://developer.mimer.com/
    If that doesn't suit you, I suspect that you will have to use some sort of proxy solution. Either by creating a servlet to accept the sql string you want to send, or by creating your own custom proxy server running J2EE. The servlet or the proxy server must be able to receive an SQL String, do the query to the actual database and return the results in some sort of format to the mobile device. Maybe just a space delimited string.
    Hope this helps
    -Daur

  • How can i import data to ipad from pc ?

    how can i ımport data to ipad from pc ?

    It would help if you said what sort of data you want to transfer - documents, spreadsheets, powerpoint, etc .
    In order to transfer files to the iPad you will first need one or more apps on the iPad that supports those file types - without an app the files cannot be saved (apart from as email attachments), as unlike 'normal' computers the iPad doesn't have a file system and files/documents have to be stored/associated with an app. Once you've got an app then, depending on what it is, transfer might be done via the file sharing section at the bottom of the iPad's apps tab when connected to your computer's iTunes, via wifi, email attachments, Dropbox etc.
    If you want to transfer/support Word and Excel documents then Documents To Go is one option (http://itunes.apple.com/au/app/documents-to-go-office-suite/id317117961?mt=8) and how to transfer to/from it is described on this pagehttp://support.dataviz.com/support.srch?docid=14497&pid=198 (the 'premium' version of the app also supports editing Powerpoint files instead of just viewing them)
    Apple's Pages app supports Word documents :http://itunes.apple.com/us/app/pages/id361309726?mt=8 (how to transfer files http://help.apple.com/pages/ipad/1.4/#tanb5b5c055)
    and their Numbers apps supports Excel documents :http://itunes.apple.com/au/app/numbers/id361304891?mt=8#(transferring files http://help.apple.com/numbers/ipad/1.4/#tanb5b5c582)

  • How can I insert my adress book from my gmail account to my Iphone 4S

    How can I insert my adress book from my gmail account to my Iphone 4S

    Rudegar - the iOS on the device would not support syncing with iCloud. iCloud would work with iOS 5.0 and later. Preferable way is to have a back up created on another computer.

  • TS1503 How can I delete data like movies from my main Toshiba HD in my MacMini?

    How can I delete data like movies from my main Toshiba HD in my MacMini?

    What does this have to do with the iPhone?

  • How can I Insert data into my msaccess Database table

    Hello all,
    I am new to Java programming and I have problem that how can i insert name into my database table.
    The code which i have written is following:
    String filename = "d:/test.mdb";
    String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=";
    database+= filename.trim() + ";DriverID=22;READONLY=true}";
    Connection con = DriverManager.getConnection(database,"","");
    String s = String.valueOf(text.getText());
    int k =10;
    Statement st = con.createStatement();
    st.execute("create table Test123(name text)");
    st.execute("INSERT INTO Test123 values" +s);
    on the INSERT program throws exception???
    can any one help me how to insert data into tabel.
    Thanks

    he INSERT program throws exception???
    can any one help me how to insert data into tabel.I have never used the jdbc driver to access, but what do you think that the flag READONLY=true means? An insert is not a read.
    Kaj

  • How can I insert data into the standard CRM tables ?

    Hi Experts,
    Scenario----
    I need to download few attributes (fields) from SAP MDM to SAP CRM via SAP XI. I'm using the 'COMT_PRODUCT_MAINTAIN_API' API for it.
    The attributes(fields) that are present in the strucutres of API are downloaded into CRM system (by executing the Inbound proxy that is created based on the Message Interface created on XI) by calling the functions present in the API.
    And for those fields that are not present in CRM, but need to be downloaded into CRM, I'm creating the Set Type attributes in CRM, which get appended to the API.
    My query is:
    There are fields in CRM into which I need to insert the values. But they are not listed in the API. So, how can I insert(/download) the values into these standard fields?
    Regret the long description. Intended to be clear.
    TIA. Points will be awarded.
    Regards,
    Kris
    Edited by: Kris on Jul 21, 2008 8:00 AM

    he INSERT program throws exception???
    can any one help me how to insert data into tabel.I have never used the jdbc driver to access, but what do you think that the flag READONLY=true means? An insert is not a read.
    Kaj

  • How can I insert data from a cfloop?

    I have a query that outputs into a cfloop. What I need it to do is insert into an access database when the changes have been made. I have looked at several tutorials but they all offer different solutions than what I am looking for. My cflloop is:
    <cfoutput>
    <cfloop query="update" >
    <tr>
    <td><input type="text" name="meeting_date" value="#meeting_date#" /></td>
    <td><input type="text" name="contact_first" value="#update.contact_first#" /></td>
    <td><input type="text" name="contact_last" value="#update.contact_last#" /></td>
    <td>Attended <input type="checkbox" name="attended" value="yes" /></td>
    <td><input type="text" name="leads" size="3" /></td>
    </tr>
    </cfloop>
    </cfoutput>
    I then try to insert into the database with:
    <cfset j = "1">
    <cfloop index="i" from="1" to="#update.recordcount#">
    <cfset meeting_date = "Form.i#j#">
    <cfset contact_first = "Form.i#j#">
    <cfset contact_last = "Form.i#j#">
    <cfset attended = "Form.i#j#">
    <cfset leads = "Form.i#j#">
    <cfset meeting_date = Form["i#j#"]>
    <cfset contact_first = Form["i#j#"]>
    <cfset contact_last = Form["i#j#"]>
    <cfset attended = Form["i#j#"]>
    <cfset leads = Form["i#j#"]>
    <cfquery datasource="#application.Database#">
    INSERT INTO quarterly (meeting_date, contact_first, contact_last, attended, leads)
    VALUES ('#meeting_date#', '#contact_first#', '#contact_last#','#attended#',leads)
    </cfquery>
    <cfset j=j+1>
    </cfloop>
    Any ideas as to how to get my cfloop to insert into my database? I don't think I can lose anymore sleep over this. Thanks,

    It's because of the way of your coding is quite wrong. Because we didn't give specific name for each individual input and didn't call specific value from each inputs.
    Here is your code I've fixed already. Check it out.
    <cfoutput>
         <cfloop query="update" >
         <tr>
              <td><input type="text" name="meeting_date#currentrow#" value="#meeting_date#" /></td>
              <td><input type="text" name="contact_first#currentrow#" value="#update.contact_first#" /></td>
              <td><input type="text" name="contact_last#currentrow#" value="#update.contact_last#" /></td>
              <td>Attended <input type="checkbox" name="attended#currentrow#" value="yes" /></td>
              <td><input type="text" name="leads#currentrow#" size="3" /></td>
         </tr>
         </cfloop>
    </cfoutput>
    <cfloop index="i" from="1" to="#update.recordcount#">
         <cfset meeting_date = form["meeting_date#i#"]>
         <cfset contact_first = form["contact_first#i#"]>
         <cfset contact_last = form["contact_last#i#"]>
         <cfset attended = form["attended#i#"]>
         <cfset leads = form["leads#i#"]>
         <cfquery datasource="#application.Database#">
              INSERT INTO quarterly (meeting_date, contact_first, contact_last, attended, leads)
              VALUES ('#meeting_date#', '#contact_first#', '#contact_last#','#attended#',leads)
         </cfquery>
    </cfloop>

  • How can I insert data in different table dynamically?

    I have one requirement ,In these  I have transaction table in which payLoad contain data like employee record,PO record,SO record  in XML format.Now I have transfer the data from transaction table to particular table(Emp,SO,PO) dynamical ? how can I do it.. Give me your suggestion guys?? Thanks in Advance

    Hello,
    Still no luck.I am surely doing silly mistakes.Anyway,Here are my workings-
    1> student_mst (id(pk),studentname) and student_guard_mst(id(fk),guardianname)
    2> created EO from both of the tables,made id in both EO as DBSequence and an association was also generated.
    3> i made that association composite by clicking the checkbox
    4> i created 2 VO from 2 EO.
    5> put those VO in Application Module.
    6> dragged and dropped 2 VO on my jspx page and dropped them as ADF Form.
    Now what to do please?

  • How can i load file into database from client-side to server-side

    i want to upload file from client-side to server-side, i use the following code to load blob into database.
    if the file is in the server-side, it can work, but if it in the client-side, it said that the system cannot find the file. i think it only will search the file is in the server-side or not, it will not search the client-side.
    how can i solve it without upload the file to the server first, then load it into database??
    try
    ResultSet rset = null;
    PreparedStatement pstmt =
    conn.prepareStatement ("insert into docs values (? , EMPTY_BLOB())");
    pstmt.setInt (1, docId);
    pstmt.execute ();
    // Open the destination blob:
    pstmt.setInt (1, docId);
    rset = pstmt.executeQuery (
    "SELECT content FROM docs WHERE id = ? FOR UPDATE");
    BLOB dest_lob = null;
    if (rset.next()) {
    dest_lob = ((OracleResultSet)rset).getBLOB (1);
    // Declare a file handler for the input file
    File binaryFile = new File (fileName);
    FileInputStream istream = new FileInputStream (binaryFile);
    // Create an OutputStram object to write the BLOB as a stream
    OutputStream ostream = dest_lob.getBinaryOutputStream();
    // Create a tempory buffer
    byte[] buffer = new byte[1024];
    int length = 0;
    // Use the read() method to read the file to the byte
    // array buffer, then use the write() method to write it to
    // the BLOB.
    while ((length = istream.read(buffer)) != -1)
    ostream.write(buffer, 0, length);
    pstmt.close();
    // Close all streams and file handles:
    istream.close();
    ostream.flush();
    ostream.close();
    //dest_lob.close();
    // Commit the transaction:
    conn.commit();
    conn.close();
    } catch (SQLException e) {

    Hi,
    Without some more details of the configuration, its difficult to know
    what's happening here. For example, what do you mean by client side
    and server side, and where are you running the upload Java application?
    If you always run the application on the database server system, but can't
    open the file on a different machine, then it sounds like a file protection
    problem that isn't really connected with the database at all. That is to
    say, if the new FileInputStream (binaryFile) statement fails, then its not
    really a database problem, but a file protection issue. On the other hand,
    I can't explain what's happening if you run the program on the same machine
    as the document file (client machine), but you can't write the data to the
    server, assuming the JDBC connection string is set correctly to connect to
    the appropriate database server.
    If you can provide some more information, we'll try to help.
    Simon
    null

  • How can i print data in smartforms from ABAP program.

    Dear gurus:
    in my abap program i process require data, and saved in a internal table.
    how can l print the data in smartforms.?
    who can give me a code sample is better:)
    reward all helpful advise.

    Try this....
    1) Tcode --> SmartForms
    2) Form name --> Z_SF_TEST Create
    3) Under Global settings
    a) Form Interface  
        Table Tab
       ITAB LIKE EKPO
    b) GLOBAL Definitions
    WA_NETPR LIKE EKPO-NETPR
    In smart forms if we want to display quantity and currency fields. We can't directly display currency field and quantity fields
    For that we have to create an extra variable in global definitions
    Ex: netpr FIELD of EKPO
    CREATE program lines and specify WA_NETWR = itab-netpr.
    4) RT CLick on main Window
       CREATE --> TABLE
      Click Table painter
    DEFAULT %LTYPE will be Created
    a) If you want more like Header footer etc add by rt click on %LTYPE1
    Table (Tab)
    %LTYPE  Radio(SELECT) 5 CM 5 CM 6 CM
    CLICK on DATA (Tab)
    INTERNAL TABLE ITAB LIKE ITAB
    5)RT click on table control and create --> program lines
    General attribute (Tab)
    INPUT PARAMETER               OUTPUT PARAMETER
    itab                               WA_NETPR
    Code Area
    WA_NETWR = ITAB-NETPR.
    6) RT CLcick on table ctl and create 3 text to display the fields
    a) % text1 +button(insert field)
       FIELD name &itab-ebeln&
    Output options (tab)
    Check New line   LINETYPE   %Ltype1
    check new cell
    b) % text2
       & itab-ebelp&
    output options
    check new cell
    c) % text2
       & wa_netpr&
    output options
    check new cell
    <b>Report ac
    Tables ekpo.
    Data: itab1 like ekpo occurs 0 with header line.
    select * into table itab1 from ekpo.
    Call function module --> smart form function module and pass your internal table</b>
    Regards,
    SaiRam

  • How can I import microsoft outlook database from an external harddisk?

    My macbook pro was washed.  I could save the hard disk. I am using it like external harddisk. But I want to import the outlook database to my new macbook. how can I do it? (without .pst or .olm file)

    Hello DIRP,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    iTunes: About the Add to Library, Import, and Convert functions
    http://support.apple.com/kb/ht1347
    Best of luck,
    Mario

Maybe you are looking for

  • How to install oracle 8 on windows xp

    i use windows xp and (pentum 4 processor ) my question :- i want to how to install oracle 8 (client) i try to do this but the installtion can't complete and there was no any error message ... please help me and tell me step by step thanks

  • HT4859 I was in a car collision and need proof of my location when I called 911. How can I get this info. from my i phone device?

    I was in a car collision and need proof of my location when I called 911. The Police Dept., refused to respond, since there were no injuries. Now, I have a dispute with the other driver who is falsely stating accident happened at another intersection

  • Scanned images lost via disk image

    Scanned over 400 slides using Canon 8600 with PhotoStudio and saved as JPGs. To transfer to a PC I selected to save as an MS-Dos format and understood I had to create a Disk Image. Did all that, now I can't find any trace of the JPGs I saved, and no

  • Error 7 \ Error 1392 in installing illustrator

    Hello I'm trying to install Illustrator in Windows 8, I get an error 7. In the more Information window: -------------------------------------- Summary -------------------------------------- - 1 fatal error(s), 0 error(s) ----------- Payload: Adobe Il

  • Why not let us pin protect apps?!?!?!?

    I know this has been posted in the past, but I would love to be able to pin protect any app I choose on my iPad.  My nine year old daughter uses my iPad regularly and I would love to be able to prevent her from using any app I choose.  HBO Go is awes