Help on JDBC  - Urgent

Hi,
I have installed JDBC-OCI driver for Oracle 8.1.7.
I have written an apllication which inserts data into oracle tables. From my program when i try to connect and insert data into 8.1.7 database , the insertion works fine (even for blob datatype). But from the same application , when i connect to Oracle 8.1.5 database and try to insert blob , it gives me the following exception
java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column
Can anyone tell me what could be the problem ??
The tables in Oracle 8.1.7 database and 8.1.5 database are similar in structure .Is it the dirver problem ?? .Please somebody help me out of this problem, i need to solve it urgently
Thanx
Ash
e-mail : [email protected]

Hello,
Hard to say what is happening here but for me it is related to a change in your DB configuration.
Since the driver can see the DB and the connection fails with an invalid user name password
Have you tried to connect using a complete connection string (putting the user, password) ? also have you tried with the thin JDBC Driver?
In a general manner is this program running in a J2EE/Web Container or a stand alone Java program?
(because when working in a container it is better to use a Data Source than a direct JDBC Connection)
Regards
Tugdual Grall

Similar Messages

  • Help me! URGENT cannot find my printer model on hp website - how do i know which cartridge to order.

    Help me! URGENT cannot find my printer model on hp website - how do i know which cartridge to order.

    Depend on which country you are in btw, for the US this should be 61 black and 61 tricolor. For most of europe this will be 301 black and 301 tri color. So to be sure tell me from which country you are.
    Say "Thanks" by clicking the Kudos Star in the post that helped you.
    Although I work for HP my posts and replies are my own
    Please mark the post that solves your problem as "Accepted Solution"

  • How can i set dynamice for week on Selection screen..pls help me..Urgent

    Hi..All
    please Help me .. i am very  confused..
    i need to set a varient for week which is dynamic on selection screen.
    b) Week from current week to current week + 2. (<b>Dynamic selection)</b>how can i set dynamice for week on Selection screen,,
    how can i do this..i am alrady set dynamice variant for Date.. there is option for D.. but in case of week there is a no option.
    pls help me..urgent
    thamks in advance.
    mayukh

    Hi,
    I think the way out is use the dynamic select option while setting up the varinat and use sy-datum to sy-datum+9 which should essentially serve the purpose.
    While saving the variant, for that particular date field check the Selection variable checkbox, then Choose D
    option and then choose current days + or - option from there.
    Rgds,
    HR

  • Hi pls help me its urgent

    hi experts'
    i have to generate asset utilization report in webdynpro
    inputs for report are some rfcs
    i get result from rfcs
    i need to float report i used bussinessgraphic object
    its not interactive
    if i go for tables
    how to create tables with drill down inside table
    how to set color for each cell of table depending on condition
    please help me
    its urgent
    and send me code n link

    Hi Vani,
    Your requirement has many things
    1. How to call RFCs
       https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/28113de9-0601-0010-71a3-c87806865f26?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#15 [original link is broken]
    2. Once you have data, how to work with BusinessGraphics ?
      https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ba2db0e5-0601-0010-9790-e271902f2c38
    (This docs contatins all the required info on webDynpro UIElements)
    3.Tables
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/28113de9-0601-0010-71a3-c87806865f26?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#46 [original link is broken]
    Regards,Anilkumar

  • Problem with connecting ipad 2 with crestron cp2e...help plss its urgent... I hv a ipad 2 with mobile pro g connected with cp2e. when i pressed any button in ipad its connet with cp2e but after 4-5 sec one error comes (warning wifi was powered off while t

    problem with connecting ipad 2 with crestron cp2e...help plss its urgent...
    I hv a ipad 2 with mobile pro g connected with cp2e. when i pressed any button in ipad its connet with cp2e but after 4-5 sec one error comes (warning wifi was powered off while the device was in auto -lock(sleep)press connect to reconnect) when i pressed again its connected with cp2e. i am using netgear wireless access point . i also has been changed access point as well as updated ipad firmware bt problem is as it is .. pls help.

    Hi have you solved the issue ?
    Cause I have the same problem.
    Tnx

  • I want to delete my data from iphone while i doesnot have the access but i know my apple id so plz help me its urgent, i want to delete my data from iphone while i doesnot have the access but i know my apple id so plz help me its urgent

    i want to delete my data from iphone while i doesnot have the access but i know my apple id so plz help me its urgent, i want to delete my data from iphone while i doesnot have the access but i know my apple id so plz help me its urgent

    Welcome to the Apple Community.
    You can only wipe your device when it is logged into iCloud and 'Find My Phone' is enabled, additionally the device will need to be switched on and connected to a wifi or cellular network.
    Unfortunately, you cannot activate iCloud or 'Find My Phone' remotely.

  • Plz help me its urgent i have iphone i dnt want my deleted texts my phone was jailbroken if i do restore widout backup should i jailbreak again ,should i unlock again,will the data of texts premantly erased plz answr me

    Plz help me its urgent i have iphone i dnt want my deleted texts my phone was jailbroken if i do restore widout backup should i jailbreak again ,should i unlock again,will the data of texts premantly erased plz answr me

    Jailbroken phones cannot be discussed in an Apple forum. If you synced your phone with your computer the texts will be in the backup, so if you restore the backup you may get them back, but with a jailbroken phone it's anybody's guess what will happen.

  • I can't download the apple ios 5 for the ipad. after downloading around 10 % an error no. 3259 occurs. it's a network error. please help . it's urgent. i am having apple ipad 2 3G wifi

    i can't download the apple ios 5 for the ipad. after downloading around 10 % an error no. 3259 occurs. it's a network error. please help . it's urgent. i am having apple ipad 2 3G wifi.

    i switched off all the security settings and all the firewalls.
    i m unable to install any of the app on the ipad
    so i saw the apple support and it said to update the older version of my ipad.
    and niether am i able to download the update nor am i able to download any app and install it in my ipad2
    i also tried to download an .ipsw file (ios5 update) from torrentz bt i am also unable to install from that as itunes rjects that file and gives an error. and also tries to delete that file. plz anyone help urgently.

  • Event OnInputProcessing not triggered ..... please help, it's urgent

    hi all,
    i have a problem in my bsp page.
    in my bsp page, there is a button which is clicked, a new pop up window will appear. after the pop up window closed the caller window will be submitted.
    after submitted, the server side script ( ABAP Code in event OnInputProcessing & OnInitiallization will be run ).
    in order to be able to do this, i used java script. and it's already works well.
    the problem is : there is 1 record that the ABAP code in event OnInputProcessing is not run. I have set break points on one of code in event OnInputProcessing, but it seems event OnInputProcessing is not triggered. if i also put the break point in event OnInitialization, it will stop in the break point in event OnInitialization.
    is there any clue why this happened ?
    please help, it's urgent because it's happened in my production system
    many thanks in advance
    regards
    eddhie

    hi Raja,
    thanks for the respond.
    the code is already works for 2 years and just 1 record of ... perhaps thousands record that used the same code.
    for other record, it go to event OnInputProcessing
    but just this 1 record it won't go to event OnInputProcessing.
    any clue ?
    please help
    regards

  • My iPad refuses to turn on... HELP THIS IS URGENT!

    Just thismorning i had my iPad 2 working fine... until it ran out of charge. Yes, I put it on the charger. Once it had been charging for about 30 minutes, i attempted to switch it on, but the apple logo sign never moved. At some times, the iPad returned to the normal unlock screen, but when i did, it froze and the frozen apple sign appeared again.
    I thought that maybe plugging it into my computer backup source would help... Well, it kinda helped but the iPad is reacting as if it is brand new and its name is now ''iPad'' when clearly, before i had this problem, it was named ''Nicole's iPad''.
    Please help, this is urgent! I have school on Tuesday and if it is not repaired by then, my assignments and homework will be lost. Thankyou

    Try to hard boot it by pressing home key and power key at same time  and keep them pressed to the count of one to fifteen. 
    And wait for few minutes it will work
    If its not working yet then connect it iTunes and update it to iOS 6,
    Before updating do not forget to back up your iPad 

  • [b]Connection to Oracle DB per JDBC URGENT HELP NEEDED PLEASE![/b]

    Hallo,
    I'm a newbie. I want to make a connection to the oracle db on the server and I have been having serious problems. See CODE and ERROR MESSAGEs below:
    import java.sql.*;
    public class SqlConnection01 {
         public static void main(String[] args) {
              Connection con = null;
              Statement stmt = null;
              try {
                   Class.forName("oracle.jdbc.driver.OracleDriver"); //Loading the Oracle Driver.
    con = DriverManager.getConnection
         ("jdbc:oracle:thin:@38.218.2.227:1521:testdb","data","test"); //making the connection.
                   stmt = con.createStatement ();// Sending a query to the database
                   ResultSet rs = stmt.executeQuery("SELECT mand,kost,ktest,kok FROM test");
                        while (rs.next()) {
                             String mandt = rs.getString("1");
                             String kostl = rs.getString("2");
                             String ktest = rs.getString("3");
                             String kokrs = rs.getString("4");
                             System.out.println( mandt + kostl ktest kokrs );
              } catch(Exception e) {
                   e.printStackTrace();
              } finally {
                   try
                        if(stmt != null) stmt.close();
                        if(con != null) con.close();
                   } catch (Exception exception) {
                        exception.printStackTrace();
    ERROR MESSAGE:
    java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=153092352)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334)
         at oracle.jdbc.ttc7.TTC7Protocol.handleIOException(TTC7Protocol.java:3695)
         at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:352)
         at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:362)
         at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:536)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:328)
         at java.sql.DriverManager.getConnection(Unknown Source)
         at java.sql.DriverManager.getConnection(Unknown Source)
         at SqlConnection01.main(SqlConnection01.java:24)
    What am I doing wrong here. I am using Oracle9i client installed on my pc (Release 2 (9.2.0.1.0) for Windows ) so I downloaded the ojdbc14 drivers for this version and I copied them in my bin directory C:\j2sdk1.4.2_06\bin\ojdbc14 .
    Secondly I can connect to the db per command line( sqlplus /nolog; conn data/test@testdb) and querry the testdb.
    I can also test the connection using oracle Net Manager and the test is successful.
    But I can't start up the lsnrctl on my pc.I get this message any time i issue the command(C:\>lsnrctl
    'lsnrctl' is not recognized as an internal or external command, operable program or batch file.)
    What am I doing wrong here? What should I do to have this connection possible. Thanks very much in advance.

    oh sure! Below is the TNSNAMES I copied from my PCfound in(C:\oracle\ora92\network\admin\SAMPLE) The next thing could be how could I get access to the TNSNAMES on the server?
    STARTS HERE:
    <alias>= [ (DESCRIPTION_LIST =  # Optional depending on whether u have
                        # one or more descriptions
                        # If there is just one description, unnecessary ]
         (DESCRIPTION=
         [ (SDU=2048) ]     # Optional, defaults to 2048
                        # Can take values between 512 and 32K
         [ (ADDRESS_LIST=    # Optional depending on whether u have
                        # one or more addresses
                        # If there is just one address, unnecessary ]
         (ADDRESS=
              [ (COMMUNITY=<community_name>) ]
              (PROTOCOL=tcp)
              (HOST=<hostname>)
              (PORT=<portnumber (1521 is a standard port used)>)
         [ (ADDRESS=
              (PROTOCOL=ipc)
              (KEY=<ipckey (PNPKEY is a standard key used)>)     
         [ (ADDRESS=
              [ (COMMUNITY=<community_name>) ]
              (PROTOCOL=decnet)
              (NODE=<nodename>)
              (OBJECT=<objectname>)
    ... # More addresses
         [ ) ] # Optional depending on whether ADDRESS_LIST is used or not
         [ (CONNECT_DATA=
              (SID=<oracle_sid>)
              [ (GLOBAL_NAME=<global_database_name>) ]
         [ (SOURCE_ROUTE=yes) ]
         (DESCRIPTION=
         [ (SDU=2048) ]     # Optional, defaults to 2048
                        # Can take values between 512 and 32K
         [ (ADDRESS_LIST= ]     # Optional depending on whether u have more
                        # than one address or not
                        # If there is just one address, unnecessary
         (ADDRESS
              [ (COMMUNITY=<community_name>) ]
              (PROTOCOL=tcp)
              (HOST=<hostname>)
              (PORT=<portnumber (1521 is a standard port used)>)
         [ (ADDRESS=
              (PROTOCOL=ipc)
              (KEY=<ipckey (PNPKEY is a standard key used)>)
         ...           # More addresses
         [ ) ]           # Optional depending on whether ADDRESS_LIST
                        # is being used
         [ (CONNECT_DATA=
              (SID=<oracle_sid>)
              [ (GLOBAL_NAME=<global_database_name>) ]
         [ (SOURCE_ROUTE=yes) ]
         [ (CONNECT_DATA=
         (SID=<oracle_sid>)
         [ (GLOBAL_NAME=<global_database_name>) ]
         ... # More descriptions
         [ ) ]     # Optional depending on whether DESCRIPTION_LIST is used or not
    I think this is the example of what is in the TNSNAMES. It hasn't got the infos I need here.It just explain.

  • WAP/Servlet help is needed URGENT!!!

    I've wrote this little wap-application, which update the library loans via mobile phones. I don't know why my login doesn't work properly (it gives error-messages in any cases). I believe I did everything right.
    Can anyone PLEASE help me finding my mistakes!? I give all my dukes for working version of mine application.
    This are my codes:
    Servlet-class
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    public class Uusinta extends HttpServlet {
    Connection conn;
    String TUNNUS = "2000000112222";
    String user = null;
    boolean yhteys = false;
    static String [] otsikko = {
    "<?xml version=\"1.0\" encoding=\"utf-8\"?>",
    "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.3//EN\" \"http://www.wapforum.org/DTD/wml13.dtd\"> " ,
    "<wml>" ,
    "<!-- Possible <head> elements here. --> " ,
    "<template>" ,
    "<do type=\"accept\" label=\"Ok\" name=\"back\" >" ,
    "<prev/>" ,
    "</do>" ,
    "</template>" ,
    "<card id=\"welcome\" title=\"WAP-kirjasto\" newcontext=\"true\">" ,
    "<do type=\"accept\" name=\"back\"><noop/>" ,
    "</do>" ,
    "<p align=\"center\"><strong>TERVETULOA</strong></p>",
    "<p><br/>Kirjastokortin numero:<br/>" ,
    "<input type=\"text\" name=\"numero\" size=\"11\" format=\"*N\" maxlength=\"13\"/><br/>" ,
    "Salasana:<br/>" ,
    "<input type=\"text\" name=\"salasana\" size=\"4\" format=\"*N\" maxlength=\"4\"/><br/>" ,
    "<a href=\"skripti.wmls#Login('$(numero)','$(salasana)','kayttaja')\">Sisaan </a></p>" ,
    "</card>" ,
    "<card id=\"loginError\">" ,
    "<do type=\"prev\" label=\"Back\">" ,
    "<go href=\"#welcome\"/>" ,
    "</do>" ,
    "<p align=\"center\"><br/>Korttinumero tai salasana on vaara.</p>" ,
    "</card>" ,
    "<card id=\"lainat\" newcontext=\"true\">" ,
    "<do type=\"accept\" name=\"back\"><noop/>" ,
    "</do>" ,
    "<do type=\"options\" label=\"Lopeta\">" ,
    "<go href=\"#goodbye\"/>" ,
    "</do>" ,
    "<p><b>Lainatut kirjat:</b></p><p> " ,
    "<select name=\"item\" title=\"Lista\">"};
    static String [] r2 = {
    "</select>" ,
    "<br/><a href=\"skripti.wmls#uusiNide('$(item)','valittu')\">Uusi valittu</a><br/>" ,
    "<a href=\"skripti.wmls#uusiKaikki()\">Uusi kaikki</a></p>" ,
    "</card>" ,
    "<card id=\"virhe\">" ,
    "<p>Kirjan uusiminen ei onnistunut. Yrit&#xE4; uudelleen.</p>" ,
    "</card>" ,
    "<card id=\"uusittu\">" ,
    "<do type=\"prev\" label=\"Back\">",
    " <go href=\"#lainat\"/>",
    "</do>",
    "<p align=\"center\"><br/>Kirja on uusittu.</p>" ,
    "</card>" ,
    "<card id=\"virheet\">" ,
    "<p>Kirjojen uusiminen ei onnistunut. Yrit&#xE4; uudelleen.</p>" ,
    "</card>" ,
    "<card id=\"uusitut\">" ,
    "<do type=\"prev\" label=\"Back\">",
    " <go href=\"#goodbye\"/>",
    "</do>",
    "<p align=\"center\"><br/>Kirjat on uusittu.</p>" ,
    "</card>" ,
    "<card id=\"goodbye\" newcontext=\"true\">" ,
    "<do type=\"accept\" name=\"back\"><noop/>" ,
    "</do>" ,
    "<p align=\"center\"><br/>Kiitos k�ynnist�. Ja tervetuloa uudelleen.</p>" ,
    "</card>" ,
    "</wml>"};
    private void teeWML(PrintWriter out)
    Statement stmt;
    ResultSet result;
    boolean ok = false;
    for (int i = 0; i <otsikko.length;i++)
         out.println(otsikko);
         if(yhteys)
    try {
    stmt= conn.createStatement();
    result = stmt.executeQuery("Select * FROM lainat l join kirja k on l.nide = k.nide where tunnus = '"+this.user+"'");
    int cnt = 1;
    while(result.next())
              ok = true;
                   String nimi ="";
         if(result.getString("nimi").length() > 8)
         nimi = result.getString("nimi").substring(0,8) + "...";
         else
         nimi = result.getString("nimi");
              out.println("<option value=\""+result.getString("l.nide")+"\">"+nimi+":"
              result.getString("erapaiva")"</option>");
    result.close();
    stmt.close();
    }catch (SQLException ex) {
    System.out.println ("\nSQLException:");
    while (ex != null) {
    System.out.println ("SQLState: "+ ex.getSQLState());
    System.out.println ("Message: "+ ex.getMessage());
    System.out.println ("Vendor: "+ ex.getErrorCode());
    ex = ex.getNextException();
    else
              out.println("<option value=\"0\">nothing</option>");
         for (int i = 0; i <r2.length;i++)
              out.println(r2[i]);
    out.close();
    private void uusiNide(PrintWriter out, String nide)
    Statement stmt;
    ResultSet result;
    boolean ok=false;
         try {
    stmt= conn.createStatement();
    result = stmt.executeQuery("Select nide from lainat where tunnus='"+user+"' ");
    int cnt = 1;
    while(result.next())
              ok = true;
    result.close();
    stmt.close();
         if(ok)
              String pvm = getPvm();
              stmt = conn.createStatement();
              int a = stmt.executeUpdate("update lainat set erapaiva='"+pvm+"' where tunnus='"+user+"' AND nide='"+nide+"'");
    }catch (SQLException ex) {
    System.out.println ("\nSQLException:");
    while (ex != null) {
    System.out.println ("SQLState: "+ ex.getSQLState());
    System.out.println ("Message: "+ ex.getMessage());
    System.out.println ("Vendor: "+ ex.getErrorCode());
    ex = ex.getNextException();
         if(ok) {
         out.println("<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">");
              out.println("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"><title>koe</title></head><body><p>OKnide</p></body></html>");
    private void uusiKaikkiNiteet(PrintWriter out)
    Statement stmt;
    ResultSet result;
    boolean ok=false;
    //t�h�n tulee viel� korttinumero
         try {
              String pvm = getPvm();
         stmt = conn.createStatement();
              int a = stmt.executeUpdate("update lainat set erapaiva='"+pvm+"' where tunnus='"+user+"'");
    }catch (SQLException ex) {
    System.out.println ("\nSQLException:");
    while (ex != null) {
    System.out.println ("SQLState: "+ ex.getSQLState());
    System.out.println ("Message: "+ ex.getMessage());
    System.out.println ("Vendor: "+ ex.getErrorCode());
    ex = ex.getNextException();
    if(ok) {
              out.println("<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">");
              out.println("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"><title>koe</title></head><body><p>OKKaikki</p></body></html>");
    private void tarkKayttaja(PrintWriter out, String kayttaja, String password)
    Statement stmt;
    ResultSet result;
    boolean ok=false;
    String nimi = null;
    if(user !=null && password !=null)
    int salasana = Integer.parseInt(password);
    try {
    stmt= conn.createStatement();
    result = stmt.executeQuery("Select * from kortti where numero='"+kayttaja+"' and salasana="+salasana);
    while(result.next())
              ok = true;
              nimi = result.getString("nimi");
    }catch (SQLException ex) {
         System.out.println ("\nSQLException:");
         while (ex != null) {
         System.out.println ("SQLState: "+ ex.getSQLState());
         System.out.println ("Message: "+ ex.getMessage());
         System.out.println ("Vendor: "+ ex.getErrorCode());
         ex = ex.getNextException();
         if(ok) {
                   this.user= kayttaja;
                   yhteys = true;
                   //teeWML(out);
         out.println("<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">");
              out.println("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"><title>koe</title></head><body><p>OK</p></body></html>");
              //out.close();
         teeWML(out);
    public void init(ServletConfig cfg) throws ServletException
    try{
    Driver d = (Driver)Class.forName("com.mysql.jdbc.Driver").newInstance();
    String sCon = "jdbc:mysql://localhost/kirjasto?user=oppilas&password=oppix";
    conn = DriverManager.getConnection(sCon);
    }catch(Exception e){
    System.out.println ("Exception: "+ e.getMessage());
    throw new ServletException(e.getMessage());
    public void doGet(HttpServletRequest req, HttpServletResponse res)
    throws IOException, ServletException
    PrintWriter out = null;
         String kutsu = req.getParameter("toiminto");
         String uusinta = req.getParameter("uusinta");
         String password = req.getParameter("password");
         String kayttaja = req.getParameter("user");
         if (kutsu == null) {
         res.setContentType("text/vnd.wap.wml");
         out = res.getWriter();
              tarkKayttaja(out, null, null);
         if(kutsu.equalsIgnoreCase("login")) {
         res.setContentType("text/html");
         out = res.getWriter();
              tarkKayttaja(out, kayttaja, password);
         if(kutsu.equalsIgnoreCase("uusi")) {
         res.setContentType("text/html");
         out = res.getWriter();
              uusiNide(out, uusinta);
         if(kutsu.equalsIgnoreCase("uusiKaikki")){
              res.setContentType("text/html");
              out = res.getWriter();
              uusiKaikkiNiteet(out);
    public void destroy()
    try{
    conn.close();
    }catch(SQLException e){
    System.out.println ("\nSQLException:");
    System.out.println ("SQLState: "+e.getSQLState());
    System.out.println ("Message: "+ e.getMessage());
    System.out.println ("Vendor: "+ e.getErrorCode());
    public String getPvm()
         Calendar x = Calendar.getInstance();
         x.add(Calendar.DATE, 30);
              int Day = x.get(Calendar.DAY_OF_YEAR);
              Day = Day+30;
              x.set(Calendar.DAY_OF_YEAR, Day);
              int monthDue = x.get(Calendar.MONTH);
              int dayOfMonthDue = x.get(Calendar.DAY_OF_MONTH);
              int yearDue = x.get(Calendar.YEAR);
                   System.out.println(yearDue+"-"+monthDue+"-"+dayOfMonthDue);
              return (yearDue+"-"+monthDue+"-"+dayOfMonthDue);
    skriptit.wmls
    extern function uusiNide(prmIn,valittu) {
         var str, result, okInd, pInd;
         str = "http://localhost:8080/kirjasto/loans?toiminto=uusi&uusinta=" +URL.escapeString(prmIn);
         var load = URL.loadString(str,"text/html");
         okInd =String.find(load, "OKnide");
         if( okInd != -1 ) {
              result = WMLBrowser.setVar(valittu, prmIn);
              WMLBrowser.go("#uusittu");
         else {
              WMLBrowser.go("#virhe");
         return "";
    extern function uusiKaikki() {
         var str, result, okInd, pInd, val, valittu;
         str = "http://localhost:8080/kirjasto/loans?toiminto=uusiKaikki&uusinta=";
         var load = URL.loadString(str,"text/html");
         okInd =String.find(load, "OKKaikki");
         if( okInd != -1 ) {
              WMLBrowser.go("#uusitut");
         else {
              WMLBrowser.go("#virheet");
         return "";
    extern function Login(prmNum, prmPass, kayttaja) {
         var str, result, okInd, pInd, pos, nimi;
         str = "http://localhost:8080/kirjasto/loans?toiminto=login&user="+URL.escapeString(prmNum)+"&password="+URL.escapeString(prmPass);
         var load = URL.loadString(str,"text/html");
         okInd =String.find(load, "OK");
         if( okInd != -1 ) {     
              pos = String.find(load, "</p");
              nimi = String.subString(load,(okInd + 7), (pos - okInd -7));
              result = WMLBrowser.setVar(kayttaja, nimi);
              WMLBrowser.go("#lainat");
         else {
              WMLBrowser.go("#loginError");
         return "";
    web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN'
    'http://java.sun.com/j2ee/dtds/web-app_2_3.dtd'>
    <web-app>
    <display-name>Verkkopizzeria</display-name>
    <servlet>
    <servlet-name>Vastaa</servlet-name>
    <servlet-class>Vastaa</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>Uusinta</servlet-name>
    <servlet-class>Uusinta</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Vastaa</servlet-name>
    <url-pattern>/vastaa</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>Uusinta</servlet-name>
    <url-pattern>/loans</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    </web-app>
    DB create and inserts
    create table kortti(
    numero char(13) not null,
    nimi char(25),
    osoite char(25),
    postinro int(5),
    puhelin char(15),
    salasana int(4),
    primary key(numero)
    create table kirja(
    nide char(10) not null,
    nimi char(25) not null,
    tekija char(25) not null,
    vuosi int(4) not null,
    primary key(nide)
    create table lainat(
    tunnus char(13) not null,
    nide char(10) not null,
    erapaiva date not null,
    primary key (tunnus, nide),
    foreign key (tunnus) references kortti,
    foreign key (nide) references kirja );
    insert into kortti
    (numero, nimi, osoite, postinro, puhelin, salasana)
    values
    ('2000000112222', 'Aku Ankka', 'Akunkatu 11', 00980, '0401231234', 2222);
    insert into kortti
    (numero, nimi, osoite, postinro, puhelin, salasana)
    values
    ('2000000113333', 'Roope Set�', 'Mikonkatu 11', 00100, '0405552223', 3333);
    insert into kortti
    (numero, nimi, osoite, postinro, puhelin, salasana)
    values
    ('2000000114444', 'Mikki Hiiri', 'Kissankuja 5', 00930, '04009876545', 4444);
    insert into kortti
    (numero, nimi, osoite, postinro, puhelin, salasana)
    values
    ('2000000115555', 'Ville Vallaton', 'Mestarinrinne 4', 00310, '0952223335', 5555);
    insert into kirja
    (nide, nimi, tekija, vuosi)
    values
    ('1111-85555','Wap', 'Pekka Niskanen', 2000);
    insert into kirja
    (nide, nimi, tekija, vuosi)
    values
    ('1111-45345','Java 2', 'Pekka Niskanen', 2002);
    insert into kirja
    (nide, nimi, tekija, vuosi)
    values
    ('1111-64648','J�rki ja tunteet', 'Jane Austin', 1998);
    insert into kirja
    (nide, nimi, tekija, vuosi)
    values
    ('1111-15671','Rikos ja rangastus', 'Leo Tolstoy', 1998);
    insert into kirja
    (nide, nimi, tekija, vuosi)
    values
    ('1111-85554','Inside Wap', 'Pekka Niskanen', 2002);
    insert into lainat
    (tunnus, nide, erapaiva)
    values
    ('2000000112222', '1111-85555', '2004-5-01-11');
    insert into lainat
    (tunnus, nide, erapaiva)
    values
    ('2000000112222', '1111-45345', '2004-5-01-11');
    insert into lainat
    (tunnus, nide, erapaiva)
    values
    ('2000000112222', '1111-64648', '2004-5-01-12');
    insert into lainat
    (tunnus, nide, erapaiva)
    values
    ('2000000113333', '1111-85554', '2004-5-01-11');
    insert into lainat
    (tunnus, nide, erapaiva)
    values
    ('2000000114444', '1111-15671', '2004-5-01-12');

    So many things wrong with this post... from [url http://www.catb.org/~esr/faqs/smart-questions.html#urgent]How to Ask Questions the Smart Way:
    Don't flag your question as ?Urgent?, even if it is for you
    That's your problem, not ours. Claiming urgency is very likely to be counter-productive: most hackers will simply delete such messages as rude and selfish attempts to elicit immediate and special attention.
    There is one semi-exception. It can be worth mentioning if you're using the program in some high-profile place, one that the hackers will get excited about; in such a case, if you're under time pressure, and you say so politely, people may get interested enough to answer faster.
    This is a very risky thing to do, however, because the hackers' metric for what is exciting probably differ from yours. Posting from the International Space Station would qualify, for example, but posting on behalf of a feel-good charitable or political cause would almost certainly not. In fact, posting ?Urgent: Help me save the fuzzy baby seals!? will reliably get you shunned or flamed even by hackers who think fuzzy baby seals are important.
    If you find this mysterious, re-read the rest of this how-to repeatedly until you understand it before posting anything at all.
    Be precise and informative about your problem
    Describe the symptoms of your problem or bug carefully and clearly.
    Describe the environment in which it occurs (machine, OS, application, whatever). Provide your vendor's distribution and release level (e.g.: ?Fedora Core 1?, ?Slackware 9.1?, etc.).
    Describe the research you did to try and understand the problem before you asked the question.
    Describe the diagnostic steps you took to try and pin down the problem yourself before you asked the question.
    Describe any recent changes in your computer or software configuration that might be relevant.
    Do the best you can to anticipate the questions a hacker will ask, and to answer them in advance in your request for help.
    Simon Tatham has written an excellent essay entitled How to Report Bugs Effectively. I strongly recommend that you read it.
    Volume is not precision
    You need to be precise and informative. This end is not served by simply dumping huge volumes of code or data into a help request. If you have a large, complicated test case that is breaking a program, try to trim it and make it as small as possible.
    This is useful for at least three reasons. One: being seen to invest effort in simplifying the question makes it more likely that you'll get an answer, Two: simplifying the question makes it more likely you'll get a useful answer. Three: In the process of refining your bug report, you may develop a fix or workaround yourself
    And from [url http://www.thejword.com]The J Word:
    Code Tags
    When you post code, please use [code] and [/code] tags as described in Formatting Help on the message entry page. It makes it much easier to read.

  • Date & time in sql through jdbc URGENT!!!

    hi,
    How do I enter date & time in this format "16 MAR 2002 12:54:23 pm" in the database of oracle through jdbc-sql?
    Please help me out.
    Its urgent.
    Regards
    Deepa Datar

    If you are familiar with Oracle, you can use PL/SQL to do the work for you. I didn't test this, but it's probably pretty close.
    String sql = "INSERT INTO TBLA
    VALUES(TO_DATE('16 MAR 2002 12:54:23 P.M.','DD MON YYYY HH24:MI:SS P.M.'))";
    I'm assuming that you know how to insert data, you are only wondering about the specifics of dates?
    This can also be done using a prepared statement. You would code the insert statement something like this:
    String sql = "INSERT INTO TBLA
    VALUES(TO_DATE(?,'DD MON YYYY HH24:MI:SS P.M.'))";
    I would suggest that if you can convert the time military (24 hour) time, it is easier to handle. The data format model for this is HH24. Otherwise you will need two prepared statements, one for A.M. and one for P.M.
    Good luck.

  • How can I get a list of IP's that have got access to my account I have a court summons and the information could only have been gathered from my Icloud account. Apple cant or wont help me. Urgent please have to go to court tomorrow.

    Need some urgent help please.
    I have a court summons for some information that has been taken from my Icloud account.
    I believe my ex employer has hired someone to hack into my account. They have had my laptop inspected by a forensic company. Orginally they did not know what the five emails I sent myself were about. Now they do. I believe they have hacked my Icloud account. I have asked Apple to help but they are refusing is there any way I can find out please feel free to email me [email protected] Thanks have to go to court tomorrow morning.

    It sounds like you really might want to consider seeking legal advice for this matter.

  • Error while opening a module. plz help me, very urgent.

    when i try to open a module, the following error message appears on my screen.
              " no j2ee component found in d:\krisp\programs\servlets".
              i've installed bea in c: drive and my servlet program is in d: drive.
              plz help me, it's very urgent.

    Can you provide some more information? What were you doing when this happened?
              Can you post the entire error message?
              -- Rob
              WLS Blog http://dev2dev.bea.com/blog/rwoollen/

Maybe you are looking for

  • Fusion SSD very slow with Mavericks

    Hi Everyone, I have a Late 2012 Mac Mini with 2.3 quad core i7, 16g ram, 1TB of HDD and Samsung 840 250G SSD installed. I recently bought the samsung SSD in order to create my own Fusion drive but Since the expected release of Mavericks I decided to

  • Using header files with call library node

    I am writing an application for Palm PDA, and I use call library node to insert some C code written in Codewarrior 9 for PalmOS. For some reason, when I build the program for the Palm the builder does not recognise the functions declared in my header

  • Jinstall 1.3.1 crash on Win NT 4.0 with

    I created html file using converter from jdk1.3.1 . When jinstall starts downloading the JRE it crashes on Win NT 4.0 SP6 Thanks Leo Perlov

  • Running low on memory

    I have recently built my own desktop. Specs: nVidia GTX 760 i7-4770k 16gb Crucial Ballistix Sport Ram I use after effects and photoshop in a pretty undemanding way (the most demanding thing I do is rotoscoping). However, when using premier pro (as we

  • Files on XFS - cannot access, No such File or directory

    I've got a HTPC with 3 partitions formatted to XFS. The pc has MythTV as the backend and XBMC as the frontend, and really doesn't get used for much else. Lately I have been seeing faults with the XFS partitions, which are spread over two different HD