import java.sql.*;
import java.io.*;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class createadressbook{
public static void main(String args[]) throws IOException,ClassNotFoundException
{
	  Class.forName("org.sqlite.JDBC");   
      Connection conn = null;
try {
	 
conn =DriverManager.getConnection("jdbc:sqlite:adress.db" );
Statement stmt = null;
ResultSet rs1 = null;
stmt = conn.createStatement();
stmt.executeUpdate("drop table if exists adressbook");
                String s1;
                s1 = "create table adressbook(" +
                " name varchar(32), " +
                " lastname varchar(32), " +
                " adress varchar(128), " +
                " city varchar(32), " +
                " state varchar(32), " +
                " zipcode varchar(32), " +
                " country varchar(32), " +
                " email varchar(32), " +
                " home_phone varchar(32), " +
                " work_phone varchar(32), " +
                " mobile_phone varchar(32), " +
                " fax varchar(32), " + 
                " web_adress varchar(32), " + 
                " home_adress varchar(128)) ";
if (stmt.execute(s1)) {rs1 = stmt.getResultSet();}

} catch (SQLException ex) {
// handle any errors
System.out.println("SQLException: " + ex.getMessage());
System.out.println("SQLState: " + ex.getSQLState());
System.out.println("VendorError: " + ex.getErrorCode());
 }}}
