Beruflich Dokumente
Kultur Dokumente
A window will appear here give the name of your database (eg.Student_db) and click OK.
Then you will find the student_db will be added under database directory.
You will find more directory are there , select table and right click and choose NEW Table
Now here enter two fields user_name varchar(20) and password varchar(20)
Click on ADD → create new DSN window will Appear on that window Select SQL Server
→Click Finish
Go to next box enter the name of your SQL Server Connection like(eg. AF2\SQLEXPRESS)
Note: start your Sql server . copy the server Name and paste (this name is required)
When you fill all the information there click on next button.
You will find Message like “ How should SQL Server verify the authenticity of the login ID? “
And leave everything as it is. Then click on Next. Then next window will appear click on finish.
When you click on finish button a new window will appear there u will find button with the name TEST data Source click that
button will find the message “test completed successfully”( if you enter the all field correctly). Click ok
Double click on source package you will find login directory ,select login and right click a new box will appear choose new frame
and insert the the item according to picture shown below.
Then right click on insert button and click event choose action performed
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
stmt.setString(1,user.toString());
stmt.setString(2,pwd.toString());
stmt.executeQuery();
con.close();
}catch(SQLException e){
e.printStackTrace();
}catch(ClassNotFoundException e){