insert into database problem - TechRepublic
General discussion
May 26, 2001 at 02:40 AM
emkay_mm

insert into database problem

by emkay_mm . Updated 25 years, 1 month ago

mem_id=req.getParameter(“ID”);
String kuntry=”India”;
Date today=new Date();
Statement st1=conn.createStatement();
String query1=”select OurUploadDate,CustomerDetails.LastUpdated from OurUpdateInfo,CustomerDetails
where CustomerDetails.CustID='”+mem_id+”‘”;
ResultSet rs1=st.executeQuery(query1);
if(rs1.next())
{
last_update=rs1.getDate(“LastUpdated”);
update=rs1.getDate(“OurUploadDate”);

pw.println(“date of last update : “+last_update);

if(last_update==null)
{
//codes to insert the update date and files downloaded
pw.println(“before insert…”);
// it’s working till here .
//Not working after this
String qry=”Insert into CustomerDetails(LastUpdated,Files_Downloaded’)values
(‘”+today+”‘,'”+kuntry +”‘)”;
Statement st4=conn.createStatement();
st4.executeUpdate(qry);
pw.println(“inserted into database”); st4.close();
it’s not inserting into database.
wat cud b the reason.plz help

This discussion is locked

All Comments