Nov

30

MODEL PAPER OF OBJECT ORIENTED PROGRAMMING USING C++ FOR BCA-III SEMESTER (BCA-S201T)

Prepare all questions without any choice. Some of them will definitely be asked in your semester Exam either directly or indirectly.

Nov

29

MODEL PAPER JAVA (BCA-V)

Prepare all questions without any choice. Some of them will definitely be asked in your semester Exam either directly or indirectly.

Nov

29

JAVA SERVER PAGES (JSP)

Nov

29

JAVA SERVLET

Nov

29

UNIT-III (NETWORKING TOPIC)

Nov

19

// insfrm1.jsp

<html>
<body>
<form name=”f1″ method=”post” action=”dbins1.jsp”>
Roll No:<input type=”text” name=”rno”><br>
Student Name:<input type=”text” name=”snm”><br>
<input type=”submit” name=”s1″ Value=”Insert Record”>
</form>
</body>
</html>

 


//dbins1.jsp

<%@page import=”java.sql.*” %>
<%
String rno=request.getParameter(“rno”);
String snm=request.getParameter(“snm”);
try{
Class.forName(“com.mysql.jdbc.Driver”);
Connection con=DriverManager.getConnection(“jdbc:mysql://localhost:3306/sample”,”root”,””);
Statement stmt=con.createStatement();
String str=”insert into stud values(“+rno+”,'”+snm+”‘)”;
//out.println(str);
stmt.execute(str);
response.sendRedirect(“dbsel.jsp”);
//out.println(“Row inserted”);
}
catch(Exception e){
out.println(e);
}
%>


 

// dbsel.jsp

<%@page import=”java.sql.*” %>
<%
try{
Class.forName(“com.mysql.jdbc.Driver”);
Connection con=DriverManager.getConnection(“jdbc:mysql://localhost:3306/sample”,”root”,””);
Statement stmt=con.createStatement();
String str=”select * from stud order by rollno”;
//out.println(str);
ResultSet rs=stmt.executeQuery(str);
while(rs.next()){
out.print(rs.getString(“rollno”)+”—–“+rs.getString(“sname”)+”<br>”);
}
}
catch(Exception e){
out.println(e);
}
%>