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;
// }
}
it would be helpfull if you mentioned the errors or problems
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
Forum Rules
Bookmarks