aparnasofte 0 Newbie Poster

Am not totally new to these concepts. I have some exposure to them. i hav just done small programs in java, and used little bit concepts of ejb and stuffs. I havn't done any real time project like this alone. Anyways, thanks for the links. I'l try them out.

Thanks.

aparnasofte 0 Newbie Poster

I need to store the questions and answers in the DB. I have used only a single word like 'username or password etc.. in the database. I don't know how to store the full question in the DB. I don't have a clue if I have to use seperate tables for question and answers. If i use seperate tables, how to store the multiple answers for the same question in the DB and how to fetch the correct answer,.. so basically, i Don't know how to store questions and the answers in the DB. This is the first step i have to do.

Next, I need to know which concept to use for the examination part. As per the requirement each question has five answers, and there can be more then one correct answer for the same question.

Thanks for replying for my post :)

aparnasofte 0 Newbie Poster

Excuse me,
I'm not trying to pose my work on some one else's back and neither 'm asking u for a code solution. All i meant was someone could guide me like "refer to this material, use such and such a concept etc., like that because i don't have anyone to provide technical guidance. Am totally helpless at present. u hav misunderstood me. I really dont want any code solution.. I should know from where and how to begin thats all.

aparnasofte 0 Newbie Poster

I hav to do a project on online examination using java and j2ee concepts. I donno from where and how to start. I donno which concepts to use. Am not confident with the concepts. But am sure I can learn and do.. plz someone guide me to do the project.

Problem description:
The examination consists of 60 multiple choice questions and they should be generated at random. A time duration of 60 mins should be given.

Am using SQL 2005 as the back end. I don't know to start from the scratch. so, guide me so that i can do it step by step.

Thanks in advance

aparnasofte 0 Newbie Poster

k thank u :)

aparnasofte 0 Newbie Poster

k thanks a lot.. :) will try that... actually i read somewhere tat SQL 2005 Express edition shouldn't b used, v hav to use only developer edition... is that true??

aparnasofte 0 Newbie Poster

am not getting any errors, but the values are not getting inserted or retrieved from the database

aparnasofte 0 Newbie Poster

i have attached one part of my stateless session bean code..


/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package forum;

import com.sun.jmx.trace.Trace;
import javax.ejb.Stateless;
import java.util.*;
import java.sql.*;


/**
*
* @author Arthi
*/
@Stateless
public class MembersBean implements MembersLocal {
private int memberid;
private String username, password, firstname, lastname, email, regdate, type;

public int getMemberid() {
return memberid;
}

public void setMemberid(int memberid) {
this.memberid = memberid;
}

public String getUsername() {
return username;
}

public void setUsername(String username) {
this.username = username;
}

public String getPassword() {
return username;
}

public void setPassword(String password) {
this.password = password;
}

public String getFirstname() {
return firstname;
}

public void setFirstname(String firstname) {
this.firstname = firstname;
}

public String getLastname() {
return lastname;
}

public void setLastname(String lastname) {
this.lastname = lastname;
}

public String getEmail() {
return email;
}

public void setEmail(String email) {
this.email = email;
}

public String getRegdate() {
return regdate;
}

public void setRegdate(String regdate) {
this.regdate = regdate;
}

public String getType() {
return type;
}

public void setType(String type) {
this.type = type;
}

public boolean checkReg(String username) {
String query = "SELECT member_id FROM Members WHERE [username]='" + username + "'";

try {
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
Connection con = DriverManager.getConnection("jdbc:microsoft:sqlserver://127.0.0.1:1269;DatabaseName=Forum");
Statement stat = con.createStatement();
ResultSet rst = stat.executeQuery(query);
System.out.println(con);
if(rst.next() == false) {
con.close();
return true;
}
else {
con.close();
return false;
}
}
catch(Exception e) …
aparnasofte 0 Newbie Poster

i have attached one part of my stateless session bean code..

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package forum;

import com.sun.jmx.trace.Trace;
import javax.ejb.Stateless;
import java.util.*;
import java.sql.*;


/**
*
* @author Arthi
*/
@Stateless
public class MembersBean implements MembersLocal {
private int memberid;
private String username, password, firstname, lastname, email, regdate, type;

public int getMemberid() {
return memberid;
}

public void setMemberid(int memberid) {
this.memberid = memberid;
}

public String getUsername() {
return username;
}

public void setUsername(String username) {
this.username = username;
}

public String getPassword() {
return username;
}

public void setPassword(String password) {
this.password = password;
}

public String getFirstname() {
return firstname;
}

public void setFirstname(String firstname) {
this.firstname = firstname;
}

public String getLastname() {
return lastname;
}

public void setLastname(String lastname) {
this.lastname = lastname;
}

public String getEmail() {
return email;
}

public void setEmail(String email) {
this.email = email;
}

public String getRegdate() {
return regdate;
}

public void setRegdate(String regdate) {
this.regdate = regdate;
}

public String getType() {
return type;
}

public void setType(String type) {
this.type = type;
}

public boolean checkReg(String username) {
String query = "SELECT member_id FROM Members WHERE [username]='" + username + "'";

try {
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
Connection con = DriverManager.getConnection("jdbc:microsoft:sqlserver://127.0.0.1:1269;DatabaseName=Forum");
Statement stat = con.createStatement();
ResultSet rst = stat.executeQuery(query);
System.out.println(con);
if(rst.next() == false) {
con.close();
return true;
}
else {
con.close();
return false;
}
}
catch(Exception e) {
e.printStackTrace();
return false;
} …
aparnasofte 0 Newbie Poster

i have attached one part of my stateless session bean code..

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package forum;

import com.sun.jmx.trace.Trace;
import javax.ejb.Stateless;
import java.util.*;
import java.sql.*;


/**
 *
 * @author Arthi
 */
@Stateless
public class MembersBean implements MembersLocal {
    private int memberid;
    private String username, password, firstname, lastname, email, regdate, type;

    public int getMemberid() {
        return memberid;
    }

    public void setMemberid(int memberid) {
        this.memberid = memberid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return username;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getFirstname() {
        return firstname;
    }

    public void setFirstname(String firstname) {
        this.firstname = firstname;
    }

    public String getLastname() {
        return lastname;
    }

    public void setLastname(String lastname) {
        this.lastname = lastname;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getRegdate() {
        return regdate;
    }

    public void setRegdate(String regdate) {
        this.regdate = regdate;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public boolean checkReg(String username) {
        String query = "SELECT member_id FROM Members WHERE [username]='" + username + "'";

        try {
            Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
            Connection con = DriverManager.getConnection("jdbc:microsoft:sqlserver://127.0.0.1:1269;DatabaseName=Forum");
            Statement stat = con.createStatement();
            ResultSet rst = stat.executeQuery(query);
            System.out.println(con);
            if(rst.next() == false) {
                con.close();
                return true;
            }
            else {
                con.close();
                return false;
            }
        }
        catch(Exception e) {
            e.printStackTrace();
            return false;
        } …
aparnasofte 0 Newbie Poster

k thank u..

aparnasofte 0 Newbie Poster

hi 'm aparna.

Am developing a web application with j2ee and SQL server 2005 EXPRESS EDITION as the back end. When i connect it with JDBC , my connection turns out to be successful. WHen i run the application, the web page is openin, but the problem is values are not getting inserted or retrieved from the db..

plz someone help me out.

aparnasofte 0 Newbie Poster

ya am able to run queries, sorry about posting it wrong, coz am new to this forum. do u know the way to solve the problem??

aparnasofte 0 Newbie Poster

hi 'm aparna...

Am developing a web application with j2ee and sql 2005 Express edition as the back end.. When i connect with the jdbc driver in system DSN and test the connection, the connection turns out to be successful, and when I run the application, the web page is opening, but I'am not able to insert values or retrieve values from the database. C
PLz some one help me out.