This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi Everybody, I want to connect the database through servlets ...I have made the html pages ... now i donno how do I make the servlets connections... Please help me out...as I am a beginner and am new to server side ...previously I was working on the client side... Kajol
Hi kajol, All u have to do is to write the JDBD code in ur service method of ur servlet. The code follows: private Connection con;Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con=DriverManager.getConnection("jdbc dbc:aadsn","scott","tiger"); Statement stmt=con.createStatement(); ResultSet rs= stmt.executeQuery("select * from tablename"); rs.close(); stmt.close(); con.close(); bye amit