• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

passing parameters between servlets and applets

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic