Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

CS506 - Web Design and Development Assignment No. 02 Solution and Discussion Spring 2014(Graded) Due Date May 23, 2014

Assignment No.2

Dear Students,

Please note that Assignment  No.2(Graded) of CS506 Will be uploaded on LMS at 16th May, 2014 (16/05/2014). Deadline of this assignment is May 23, 2014 (23/05/2014).

Assignment No.1 will include Lectures No. 09 to 14

 

In case of any query, you can send email at cs506@vu.edu.pk

 

Views: 17019

Replies to This Discussion

Tariq bro, plz share how to code to add functionality in  BACK, VIEW buttons.

PLZ CHECK IT WHAT WRONG IN IT

 import java.sql.*;
    public class GradeBook{

    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new SGB().setVisible(true);
            }
        });

     try{
     Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
     String url="jdbc:odbc:GradeBook";
     Connection con =DriverManager.getConnection(url);
     System.out.println("Connection Successful established");
     InfoBox.ShowMessageBox("Established");

     }
    catch (Exception e)
    {
    System.out.println(e);
    }
    }
    }

ERROR IS NO MAIN CLASS FOUND

mairay sath b yei masla hay

Khalid Afzal

did you fix it or not yet

Khalid Afzal: only one class will contain main method, and that is SGB class, in GradeBook Class you have to write methods to get data from database and show it in the given format, and then you have to make an object in view button coding so that when the view button is clicked, then GradeBook class method will be invoked to display the data...

Yes, only SGB class will contain main method.

Netbeans mei database kese connect hoga

ap nay netbeans me khud say coding likhni hay database connect karnay ki,

you may write the coding in open under the SGB class, or you may write a method to connect to the database and call it anywhere you want to connect to the database...

koi code hi send kerdo

this is the coding to enter data into StudentProfile

try
            {
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                String url = "jdbc:odbc:gradeBookDSN";
                Connection con = DriverManager.getConnection(url);
                String sql = "insert into StudentProfile (StudentID, StudentName, StudyProgram, Email) values (?, ?, ?, ?)";
                PreparedStatement ps = con.prepareStatement(sql);
                ps.setString(1, student_id);
                ps.setString(2, student_name);
                ps.setString(3, study_prog);
                ps.setString(4, student_email);
            
                ps.executeUpdate();
                JOptionPane.showMessageDialog(null,"Record is added successfully!");
            }
           catch(Exception ex)
           {
             JOptionPane.showMessageDialog(null, ex);
           }

here "student_id, student_name, study_prog, student_email" are the values of input fields of the form.

Not get yet

Muhammad Junaid Arshad Can you tell me how to add functionality in "view" & "Back" buttons?


RSS

Looking For Something? Search Below

Top Trends 

Latest Activity

Profile IconMuhammad Rizwan Ansari, Muhammad Imran, Hafsa kalsoom and 3 more joined Virtual University of Pakistan
1 hour ago
Melissa Dorn replied to + M.Tariq Malik's discussion Reality of Modern Co-Education System of Pakistan
14 hours ago
memon added a discussion to the group MGT610 Business Ethics
yesterday
Profile IconMalaika Iqbal, Tahir Abbas, Esha Arooj and 1 more joined Virtual University of Pakistan
yesterday
Profile IconStudent, Batool, Suha Khan and 3 more joined Virtual University of Pakistan
Friday
Nida Arshad Javaid Ch posted photos
Friday
subhan ali joined + M.Tariq Malik's group
Friday
Suha Khan joined + M.Tariq Malik's group
Friday

© 2022   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service