JDBC - how to handle insert that returns value (bind?)

Hi,
I'm trying to do an insert into a table in an Oracle database with an auto-incrementing primary key (using a trigger and sequence) and I need to retrieve the value after the insert. From SQL*Plus, I'd enter:
var id number;
INSERT INTO mytable (name) VALUES ('foo') RETURNING id into :id;
whereupon if I do "print id", I get the value of the id field from the newly-inserted record.
The big question is how to achieve the same thing using JDBC. I've been flailing around all morning trying to figure it out and suspect it has something to do with using a CallableStatement instead of a PreparedStatement, but all of the examples I've seen so far only deal with calling stored procedures instead of raw SQL, and they all omit the part where some variable is bound to the resultset.
Assuming I want to have the Java variable (int? Integer()?) "newId" set to the value being returned by the SQL statement as "id" (or ":id"?), what do I need to do between getting the connection and looking at "newId" to see what the value returned by the statement is?
ie,
Connection conn = db.connect();
int newId;
// show me what I need to do here
System.out.println("The id of the newly-inserted record is:");
System.out.println(newId);Thanks!

This is untested:
use the executeUpdate() method from the Statement. The return value will be your result from the RETURNING id portion of your SQL statement, if not then you'll probably have to do a seperate select or/and explicit return to get the value back from SQL.

Similar Messages

  • How to retreive and display return value from BAPI

    Hello,
    I am using SUP to create a sales order application. In my MBO I have a create operation which calls a BAPI to create a sales order. How can I retrieve the return value (saled doc number) and display it on a screen and display it as an Alert of BB application.
    Regards
    Nidhideep Bhandari

    Hi David Brandow,
    I have tried your solution where I just created a MBO for my 'operation' and I'm using sync parameters to execute the RFC.
    The problem I'm facing is, for example, if I create a record it gets saved in the MBO table and the record successfully gets created in SAP as well after a sync. But when I create another record and sync, the previously saved record in MBO table also gets executed so I'm getting duplicate entries in SAP.
    Have you or anyone faced this problem?
    Any response is appreciated. Please let me know if I'm not clear, I realized its a complicated scenario.
    Thanks,
    Sandeep

  • How can i pass function return values in to varray

    Hi
    create procedure name(parameters list)
    here ---i am calling a function
    varname := function name
    returns 4 values
    My doudt is how can i pass these return values in to varray..
    Type varray vname[5] date type
    Begin
    statements
    end prodedure name;
    pls clarify me its urgent

    This may give u a start
    sql>
    create or replace package test_array_pack as
    type ar1 is varray(10) of number;
    end;
    Package created.
    sql>
    create or replace function test_array return test_array_pack.ar1 is
      v_ar1 test_array_pack.ar1;
    begin
    v_ar1 := test_array_pack.ar1(1,2,3,4);
    return v_ar1;
    end;
    Function created.
    sql>
    declare
    v_ar2 test_array_pack.ar1;
    begin
    v_ar2 := test_array;
    end;
    PL/SQL procedure successfully completed
    Message was edited by:
            jeneesh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How can i insert the variable value in MS ACCES Query

    i am creating one Query (query1) in MS ACCESS ( like we creaate Tables, Forms and Reports in MS ACCESS ) in this Query i have given 2 constent value in BETWEEN CLAUSE , after that i Created a CROSS QUERY which is based on the privious Query (query1).
    Now i want to insert the variable value using JSP and HTML in to Query(query1).
    Doing this i want to execute the Query (query1) with variable perameters and
    wants to get the risponce form CROSS QUERY.
    In this matter how can i insert the value in Query(query1) using JDBC and JSP.

    The query is
    Select ZMSGMAP.GROUP_CODE as 'group', ZMSDSTATE.STATE_DESC as 'state', ZMSTRN.YRMON, sum(ZMSTRN.CMAQTY) as 'qty' from ZMSDSTATE,ZMSGMAP,ZMSTRN Where ZMSTRN.STATE=ZMSDSTATE.STATE and ZMSTRN.PLANT=ZMSGMAP.PLANT_CODE and ZMSTRN.YRMON between "+p1+" and "+p2+" Group by ZMDGMAP.GROUP_CODE, ZMSDSTATE.STSTE_DESC, ZMSTRN.YRMONUsing this query i m trying to display the risult but the YRMON is displaying in a single column, i want to display it ia seperat columns. here p1 and p2 is YRMON(it is the yer month like 200102), for this solution i have created Cross table Query which is based on uper Query (query1) and design it column wise Display, it is givng the right display, but the problem is this i m not getting the technique throw which i can insert the variable values in to the query1 (which is designed in MS ACCESS).
    u can contact me on [email protected] for more details.

  • Getter/setter methods -- how do I use the return values

    I'm just learning Java, and I haven't been to this site since the end of July, I think. I have a question regarding getter and setter methods. I switched to the book Head First Java after a poster here recommended it. I'm only about a hundred pages into the book, so the code I'm submitting here reflects that. It's the beginnings of a program I'd eventually like to complete that will take the entered information of my CD's and alphabetize them according to whatever criteria I (or any user for that matter) choose. I realize that this is just the very beginning, and I don't expect to have the complete program completed any time soon -- it's my long term goal, but I thought I could take what I'm learning in the book and put it to practical use as I go along (or at lest try to).
    Yes I could have this already done it Excel, but where's the fun and challenge in that? :) Here's the code:
    // This program allows the user to enter CD information - Artist name, album title, and year of release -- and then organizes it according the the user's choice according to the user's criteria -- either by artist name, then title, then year of release, or by any other order according to the user's choice.
    //First, the class CDList is created, along with the necessary variables.
    class CDList{
         private String artistName;//only one string for the artist name -- including spaces.
         private String albumTitle;//only one string the title name -- including spaces.
         private int yearOfRelease;
         private String recordLabel;
         public void setArtistName(String artist){
         artistName = artist;
         public void setAlbumTitle(String album){
         albumTitle = album;
         public void setYearOfRelease(int yor){
         yearOfRelease = yor;
         public void setLabel(String label){
         recordLabel = label;
         public String getArtistName(){
         return artistName;
         public String getAlbumTitle(){
         return albumTitle;
         public int getYearOfRelease(){
         return yearOfRelease;
        public String getLabel(){
        return recordLabel;
    void printout () {
           System.out.println ("Artist Name: " + getArtistName());
           System.out.println ("Album Title: " + getAlbumTitle());
           System.out.println ("Year of Release: " + getYearOfRelease());
           System.out.println ("Record Label: " + getLabel());
           System.out.println ();
    import static java.lang.System.out;
    import java.util.Scanner;
    class CDListTestDrive {
         public static void main( String[] args ) {
              Scanner s=new Scanner(System.in);
              CDList[] Record = new CDList[4];
              int x=0;     
              while (x<4) {
              Record[x]=new CDList();
              out.println ("Artist Name: ");
              String artist = s.nextLine();
              Record[x].setArtistName(artist);
              out.println ("Album Title: ");
              String album = s.nextLine();
              Record[x].setAlbumTitle(album);
              out.println ("Year of Release: ");
              int yor= s.nextInt();
                    s.nextLine();
              Record[x].setYearOfRelease(yor);
              out.println ("Record Label: ");
              String label = s.nextLine();
              Record[x].setLabel(label);
              System.out.println();
              x=x+1;//moves to next CDList object;
              x=0;
              while (x<4) {
              Record[x].getArtistName();
              Record[x].getAlbumTitle();
              Record[x].getYearOfRelease();
              Record[x].getLabel();
              Record[x].printout();
              x=x+1;
                   out.println("Enter a Record Number: ");
                   x=s.nextInt();
                   x=x-1;
                   Record[x].getArtistName();
                Record[x].getAlbumTitle();
                Record[x].getYearOfRelease();
                Record[x].getLabel();
                Record[x].printout();
         }//end main
    }//end class          First, I'd like to ask anyone out there to see if I could have written this any more efficiently, with the understanding that I'm only one hundred pages into the book, and I've only gotten as far as getter and setter methods, instance variables, objects and methods. The scanner feature I got from another book, but I abandoned it in favor of HFJ.
    Secondly --
    I'm confused about getter and setter methods -- I'd like someone to explain to me what they are used for exactly and the difference between the two. I have a general idea, that getters get a result from the method and setters set or maybe assign a value to variable. I submitted this code on another site, and one of the responders told me I wasn't using the returned values from the getter methods (he also told me about using a constructor method, but I haven't got that far in the book yet.). The program compiles and runs fine, but I can't seem to figure out how I'm not using the returned values from the getter methods. Please help and if you can explain in 'beginners terms,' with any code examples you think are appropriate. It will be greatly appreciated.
    By the way, I'm not a professional programmer -- I'm learning Java because of the intellectual exercise and the fun of it. So please keep that in mind as well.
    Edited by: Straitsfan on Sep 29, 2009 2:03 PM

    Straitsfan wrote:
    First, I'd like to ask anyone out there to see if I could have written this any more efficiently, with the understanding that I'm only one hundred pages into the book, and I've only gotten as far as getter and setter methods, instance variables, objects and methods. The scanner feature I got from another book, but I abandoned it in favor of HFJ.Yes, there is tons you could have done more efficiently. But this is something every new programmer goes through, and I will not spoil the fun. You see, in 3 to 6 months when you have learned much more Java, assuming you stick with it, you will look back at this and be like "what the hell was I thinking" and then realize just haw far you have come. So enjoy that moment and don't spoil it now by asking for what could have been better/ more efficient. If it works it works, just be happy it works.
    Straitsfan wrote:
    Secondly --
    I'm confused about getter and setter methods -- I'd like someone to explain to me what they are used for exactly and the difference between the two. I have a general idea, that getters get a result from the method and setters set or maybe assign a value to variable. I submitted this code on another site, and one of the responders told me I wasn't using the returned values from the getter methods (he also told me about using a constructor method, but I haven't got that far in the book yet.). The program compiles and runs fine, but I can't seem to figure out how I'm not using the returned values from the getter methods. Please help and if you can explain in 'beginners terms,' with any code examples you think are appropriate. It will be greatly appreciated.
    By the way, I'm not a professional programmer -- I'm learning Java because of the intellectual exercise and the fun of it. So please keep that in mind as well.First, if you posted this somewhere else you should link to that post, it is good you at least said you did, but doubleposting is considered very rude because what inevitably happens in many cases is the responses are weighed against each other. So you are basically setting anyone up who responds to the post for a trap that could make them look bad when you double post.
    You are setting you getters and setters up right as far as I can tell. Which tells me that I think you grasp that a getter lets another class get the variables data, and a setter lets another class set the data. One thing, be sure to use the full variable name so you should have setRecordLabel() and getRecodLabel() as opposed to setLabel() and getLabel(). Think about what happens if you go back and add a label field to the CDList class, bad things the way you have it currently. Sometimes shortcuts are not your friend.
    And yes, you are using the getters all wrong since you are not saving off what they return, frankly I am suprised it compiles. It works because you don't really need to use the getters where you have them since the CDList Record (should be lowercase R by the way) object already knows the data and uses it in the printout() method. Basically what you are doing in lines like:
    Record[x].getArtistName();is asking for the ArtistName in Record[x] and then getting the name and just dropping it on the floor. You need to store it in something if you want to keep it, like:
    String artistName = Record[x].getArtistName();See how that works?
    Hope this helped, keep up the good learning and good luck.
    JSG

  • Calling a method that returns values in a map - using JSTL

    Hi I have a method within an object that returns a List for a particular category
    public List<String> getFieldsInCategory(String categoryName){
        return _categoryFieldsMap.get(categoryName); //This is a map that returns a list                                                             
      }Trying to call the above function in jsp, the object is available as "document",
    how do i pass a key to the above function to return a List.
       <c:forEach items="${document.fieldsInCategory('ABSTRACT')}" var="temp">How do i get the list by passing a string key to my method,
    please let me know how to go about this.
    Thanks

    JSTL can not directly call methods that take parameters.
    All it can do is access javabean properties - ie via the revealed get/set methods.
    You can fudge it by having a seperate variable to set:
    Map  _categoryFieldsMap;
    String category = null;
    public void setCategory(String category){
      this.category = category;
    public String getCategory(String category){
      return category;
    public List<String> getFieldsInCategory(){
        return _categoryFieldsMap.get(categoryName); //This is a map that returns a list                          
      }You would then do it like this in your JSP:
    <c:set target="document.category" value="ABSTRACT"/>
    <c:forEach items="${document.fieldsInCategory}" var="temp">
    ...The other alternative is to return the entire map to the page.
    EL accesses maps quite handily.
    so given a method that returns the map:
    public Map getCategoryFieldsMap(){
    return _categoryFieldsMap;
    then the expression: ${document.categoryFieldsMap.ABSTRACT} returns what you are after.
    Hope this helps,
    evnafets

  • How to map AM method return values in the bean

    Hello -
    I have this requirement to map AM method return values in the bean as explained below. Please suggest a solution.
    Scenario: I am calling an AM method, which returns a String object on page load.
    AMImpl Method-
    public String getProfileName (){
    return "Profile";
    I wish to catch this retun value in the Bean Variable on page Load. I have created a methodAction biding on page and invokeAction to call this method on Page Load, but I don't know how to catch this value in the bean. Please suggest how to achieve this. Also, I need to achieve this in jsp page. I can't use TaskFlow for this.
    I am using ADF 11g.
    Regards -
    Rohit
    Edited by: Rohit Makkad on Apr 21, 2010 12:23 AM

    Hi, I think there are two ways, from the data control drag n drop the methods return value to the page. This way a binding for that will be created at the page definition eg retVal.
    and in the backing bean you can access it by calling resolveExpression("#{bindings.retVal.inputValue}")
    You can also call your method directly from the backbean
    ((YourAppModuleImpl) getBindings().getDataControl().getApplicationModule()).yourMethod();
    public DCBindingContainer getBindings() {
    return (DCBindingContainer) resolveExpression("#{bindings}");
    I dont know if the second method suits you
    Tilemahos

  • Procedure which inserted and returns value

    i don't know english very vell and sorry about it :(((
    i want write a procedure which inserted or updated table and returns it's ID ...
    it's my tabel :
    DROP TABLE T_STUDENT CASCADE CONSTRAINTS;
    CREATE TABLE T_STUDENT
    ID NUMBER(10) NOT NULL,
    NAME VARCHAR2(100) NOT NULL,
    SURNAME VARCHAR2(100) NOT NULL,
    AGE NUMBER(38) NOT NULL,
    CNAUTHORID NUMBER(10) NULL
    and i have procedure which inserted or updated this table and return's ID (if ID<=0 then inserted else updated):
    CREATE OR REPLACE procedure sp_InsertUpdate_T_STUDENT
    nResID in out NUMBER,
    nID in NUMBER,
    vchNAME in VARCHAR2,
    vchSURNAME in VARCHAR2,
    nAGE in NUMBER,
    nCNAUTHORID in NUMBER
    as
    begin
    if nID<=0 then
    insert into T_STUDENT (NAME,SURNAME,AGE,CNAUTHORID) values (vchNAME,vchSURNAME,nAGE,nCNAUTHORID );
    else
    update T_STUDENT set NAME=vchNAME,SURNAME=vchSURNAME,AGE=nAGE,CNAUTHORID=nCNAUTHORID
    where ID=nID;
    end if;
    select ID into nResID from T_STUDENT where NAME=vchNAME and
    SURNAME=vchSURNAME and AGE=nAGE and CNAUTHORID=nCNAUTHORID;
    end;
    this procedure is correct but maybe returns more then one ID and i don't want it :( ....... how i can write this procedure otherwise ???

    First of all does yout insert statement work??
    insert into T_STUDENT (NAME,SURNAME,AGE,CNAUTHORID) values (vchNAME,vchSURNAME,nAGE,nCNAUTHORID )
    Should you not insert also the value ID?
    The way i would do this was first since u have only have one return value is a function like this:
    function sp_InsertUpdate_T_STUDENT
    nID in NUMBER,
    vchNAME in VARCHAR2,
    vchSURNAME in VARCHAR2,
    nAGE in NUMBER,
    nCNAUTHORID in NUMBER
    ) return number
    is
    ln_id number;
    begin
    if nID<=0 then
    insert into T_STUDENT (ID,NAME,SURNAME,AGE,CNAUTHORID) values (SEQ_ID.NEXTVALUE,vchNAME,vchSURNAME,nAGE,nCNAUTHORID ) returning ID into ln_id;
    else
    update T_STUDENT set NAME=vchNAME,SURNAME=vchSURNAME,AGE=nAGE,CNAUTHORID=nCNAUTHORID
    where ID=nID;
    ln_id := nID;
    end if;
    return ln_id;
    end;

  • How can I define that the value of a column should always be in UPPER case

    Hi,
    I want to make sure that the value in a column is always in UPPER case.
    Can we give this condition while creating or altering a table.
    A trigger can do it easily, but I was wondering if we could define a column to have values with upper case all the time, independent of what values are inserted. I mean if we give a lower case value in the insert statement, it should be converted automatically to upper case & stored.
    I want something like
    Alter table MY_TABLE Modify ( col1_upper varchar2(25) default UPPER(Col1_upper));
    But the above statement does not work as it references the col of the table.
    Thanks
    Sunil

    Well, you can put a check constraint on to prevent someone from putting lowercase data in:
    alter table my_table add constraint my_table_check_upper check (col1_upper = upper(col1_upper));However, I know of no way to modify the data being inserted/updated in a table without a trigger.
    Richard

  • Create SP that returns value and at the same time displays query result in output window

    I would like create an SP which will return the records from the table and also return value to my c# client application.
    For Example:
    Select * from employee returns all the query results in output window.
    Now I want to create an SP
    Create procedure Test
    As
    Declare @ret int,
    Select * from employee
    set @ret = Select count(*) from employee
    if @ret > 0
    return 1
    else
    return 0
    The above algo should return 1 0r 0 to c# client application and at the same time display all employees in sql query output window.
    Can u pls help in this regard.

    The above algo should return 1 0r 0 to c# client application and at the same time display all employees in sql query output window.
    Why?  and No!
    Why?  Your procedure generates a resultset of some number of rows.  You check the resultset for the presence of rows to determine if "anything is there".  You don't need a separate value to tell you this.  Note that it helps
    to post tsql that is syntactically correct.   While we're at it, if you just need to know that rows exist there is no need to count them since that does more work than required.  Simply test for existence using the appropriately-named function
    "exists".  E.g., if exists (select * from dbo.employee). 
    No!  A stored procedure does not display anything anywhere.  The application which executes the procedures is responsible for the consumption of the resultset; it chooses what to do and what to display. 
    Lastly, do not get into the lazy habit of using the asterisk in your tsql code.  That is not best practice.  Along with that, you should also get into the following best practice habits:
    schema-qualify your objects (i.e., dbo.employee)
    terminate every statement - it will eventually be required.

  • How to handle data that got from SAP by Webservice?

    Hi, Gurus.
    I am working on IFbA with ABAP and Adobe LiveCycle Designer.
    I've developed a function module in R/3 system and created webservice, connected the WSDL address to the form. The problem is how can i handle data that got from SAP by Webservice?
    It's Ok if i bind the dataconnection node to the form element, but how can i handle data without binding to the form element? I mean that how can i use the data retrieved from Webserivce in the Javascript, please give me some sample code or script method.
    Thanks.

    Hi Yang,
    If you are using Web Service, then the binding will be done automatically.
    It can't grow automatically, what else should i do to achieve this?
    1.Select the table(make sure you are not selecting subform) in Hierarchy view
    2. Under table select the Row which is having the required fileds for data
    3. In the Binding of that row, check the checkbox "Repeat Row for each item data" and under that check the Min Count which will set the default row **** to 1
    Regards,
    Sachin

  • How to use Insert for mulit-values

    Can anyone help, I try to insert mulit-values using insert command. but keep getting error. here is the code.
    INSERT INTO PRODUCTS
    VALUES (
    'C','CABLE',39.95,
    'D','DSL',29.95,
    'U','DIALUP_56K',19.95);
    Thank you!

    The SQL you posted isn't valid, assuming that there are only three columns in your table. The type of insert statement you posted can only insert 1 row at a time.
    You could look into loading data into collections and using the bulk insert syntax to insert multiple values in a single statement. Please post to the PL/SQL forum if you need more assistance on this.
    Justin

  • How to call functions that return package local types?

    Hi everyone, I have a Pl/Sql function in a package that returns a package-local type.
    I would like to call this function from Java, but I don't know what to pass to "statement.registerOutParameter()"
    (it gives this error:
    Unable to resolve type: "XDRIVE_B2B.TEST1.MYTYPE)
    Here's the simple version with one package:
    package TESTPKG IS
    TYPE MYTYPE IS VARRAY(1) OF INTEGER;
    FUNCTION FCT2 RETURN MYTYPE;
    end;
    package body testpkg IS
    FUNCTION FCT2 RETURN MYTYPE IS
    BEGIN
    RETURN mytype(55);
    END;
    end;
    and here's the java code:
    void javatest(OracleConnection conn)
    throws SQLException
    String sql = "{ call ? = testpkg.fct2() }";
    OracleCallableStatement st =
    (OracleCallableStatement) conn.prepareCall(sql);
    st.registerOutParameter(1, OracleTypes.ARRAY, "MYUSERNAME.TESTPKG.MYTYPE");
    st.execute();
    and as I said above, the java code fails with:
    java.sql.SQLException: Fail to construct descriptor: Unable to resolve type: "MYUSERNAME.TEST1.MYTYPE"
    I can't really have this type live outside of a package because in the real case, it's not a VARRAY(1) of integer, it's a VARRAY(1) of MYTABLE%ROWTYPE, which only seems to compile inside a package.
    thanks for any opinions,
    george moudry
    null

    JDBC, JPublisher, and SQLJ do not support PL/SQL-only types. This includes PL/SQL index tables and record types.

  • How to handle different currency PO value summation in start rountine of Up

    We've got two ODSs, ODS1 for PO records and ODS2 for contract records. We feed data from ODS1 to ODS2. Multiple PO records in ODS1 could contain one same contract number which is the key in ODS2. In the update rule we select Overwrite as update mode for a key figure PO order value and our purpose is to sum all the values of this key figure up for the same contract number which is the key in ODS2 and place total summation value into the corresonding contract number record in ODS2.  In the start rountine of the update rule from ODS1 to ODS2, we've already generated the code to realize the above and the result is correct!  But you know the summation result is only correct for one unique doc currency, we are worried if both currencies of USD and CAD exist for the multiple PO records with the same contract number, then the summation would not be right.  Anyway in the code to handle this different currency thing?
    Thanks

    hi Ajay,
    The link you provided only says the following:
    "Creating a Routine for Currency Translation:
    If you want to translate currencies in the update even though the currency translation is not available for one of the above reasons, you can create a routine. Choose Routine, set the Unit Calculation in the Routine and choose  Create Routine. In the routine editor you get the additional return parameter UNIT, the value of which is used to determine the target currency.".
    I follow the above SAP help, but can't get an additional return parameter UNIT, also it doesn't tell the details on how to do the convertion.
    Thanks anyway!

  • How to retrieve web services return value

    I am using htmldb 2.0 and have created up the webservice reference. It's a simple web services, it will only return the string that I typed in one text area. Now my problem is that how can I print the string into my report area. In my webservice process, i just define the output of the webservices stored in one item in that page. Shall I write the value of that item to report region? Any ideas??
    Regards,
    Ke Lin

    Did you have any luck with this.
    I am having the same problem, I think, can set up the web service and it tests ok but when I run the process nothing happens, no values are passed back. Have checked the session state and nothing is there.
    Andrew

Maybe you are looking for

  • Post Goods Receipt for Inbound Delivery with BAPI_GOODSMVT_CREATE

    Hello, I try to post GR for an Inbound Delivey with BAPI_GOODSMVT_CREATE and it is not working. I know delivery number and PO number and give both to the bapi. I am not sure how to set the movement indicator in the item. When I set it to B. I do get

  • Java DC not deployed with WebDynPro DC

    Hi, I've been testing the DC functionality and I'm trying to create the following: 1) WebDynPro DC (DCA) 2) Java DC (DCB) DCB has code for reading data from a database table (three classes, one is set as a public part). This code is functioning ok in

  • I  need help purchasing adobe creative cloud as a student?

    Adobe Creative Cloud for Students I am 13 and in elemantary school. Under the guidlines i beleive I am eligible for student pricing. But I dont know how I will buy it, I need to know what type of proof I need to send to verify that I go to a school,

  • How to set local help as default in ID CS5?

    Just received a replacement laptop w/CS5 installed & cannot figure out how to disable/turn off community help...I want it to default to local help whether connected to the net or not. Thanks Update Info: Or, if setting local help as default is not po

  • Tween problem :S

    I'm trying my butt off with this one. I'm loading images in a movieclip with an xml. There are 2 buttons that I use to scroll left en right trough the images. Scroll-effect is animated with a tween class. Now there is a problem when a want to change