Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

passing parameters between servlets and applets

 
aparajita kulkarni
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,

Actually i want to retriew data from MSAccess database in applets. because applets cannot communicate with MSAccess DB so i thought of using servlets in between. now i want to retriew data from DB to servlets then i want to pass those values to applets and any changes made to then will be sent back to servlet and servlet will update the DB.

so can any one send me sample code where servlets read data from MSAccess and fwd it to applets. give clear idea how can i do it.

aparajita
 
Himanshu Bisht
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
this might help

//connection to db
dbConnection dbConn = new dbConnection();
Statement stmta = dbConn.connect();
//ur query

String query1="select prod_id from product_tbl where prod_type='"+type+"' and prod_width='"+width+"' and prod_micron='"+micron+"' ";

//resultset
rs1=stmta.executeQuery(query1);
//accessing rs
if(rs1.next())
{
id=(String)rs1.getString("prod_id");
......
......
}
now u have the values u can pass it to applet
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the idea is that you try yourself and then come to us with specific questions.
People are not generally inclined to do all your work for you unless you pay us consultancy fees.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic