MCSL-054 Solved Assignment 2013-14

September 19, 2017 | Author: Dibya Nandi | Category: Computer Programming, Programming Paradigms, Software Development, Technology, Computing
Share Embed Donate


Short Description

assignment...

Description

MCSL-054 Solved assignment 2013-14 By Sheel:- [email protected] Write at your own risk

PART-I: Lab for MCS-051 (Advanced Internet Technologies)

Question 1: Write a program using Servlet/JSP that accepts the account number of a bank customer as input. The program should print the details of the account. Make necessary assumptions whereever required. Answer.1 1){ ofset = offset*per_page-per_page; } if((request.getParameter("account_no")!=null) && request.getParameter("account_no")!="") { String user = session.getAttribute("userid").toString(); String account_no = request.getParameter("account_no"); String sd[] = request.getParameter("sdate").toString().split("-"); String ed[] = request.getParameter("edate").toString().split("-"); String sdate = sd[2]+"-"+sd[0]+"-"+sd[1] ; String edate = ed[2]+"-"+ed[0]+"-"+ed[1]; Connection conn = null; String url = "jdbc:mysql://localhost:3306/"; String dbName = "userdetails"; String driver = "com.mysql.jdbc.Driver"; String username = "root"; String userPassword = "root"; String color = "#F9EBB3"; try { Class.forName(driver).newInstance();

MCSL-054 Solved assignment 2013-14 By Sheel:- [email protected] Write at your own risk

conn = DriverManager.getConnection(url+dbName,username,userPassword); Statement stcount = conn.createStatement(); String strQuerycount = "select count(*),account_no from transaction where username='"+user+"' and account_no='"+account_no+"' and cdate>='"+sdate+"' and cdate='"+sdate+"' and cdate
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF