www.webdeveloper.com
Results 1 to 2 of 2

Thread: How to handle arrays

  1. #1
    Join Date
    Feb 2004
    Location
    Brasil porto Aelgre
    Posts
    544

    How to handle arrays

    Hi

    I am attempting to modify a method who receives one date and stores it on the database to receive many dates at one time and store it on the DB, what is commented is my attempt. How can i do it ? what is needed ?

    Thank´s in advance

    public boolean incluiCtpCalendar() throws SQLException, java.lang.Exception {
    boolean b = false;
    int numlinhas = 0;
    String sql ="";
    // String [] Datas = (String []) request.getParameterValues("sDataReuniao");
    //for (int i=0;i < Datas.length;i++) {
    sql = "INSERT INTO Ctp_calendario ("
    +" cdctpcategory,"
    +" DataReuniao,"
    +") VALUES ("
    +" '"+this.sCdCategory+"', "
    +" to_date('"+this.sDate+"','DD/MM/YYYY'), "
    +" )";
    try {
    numlinhas = bd.executeUpdate(sql);
    }
    catch (SQLException e) {
    e.printStackTrace();
    throw e;
    }
    if (numlinhas > 0)
    b = true;
    return b;
    // }
    }

  2. #2
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    6,136
    it would be helpfull if you mentioned the errors or problems
    Cheers

    Khalid

    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles