DATABASE CONNECTOR IN JAVA USING MS ACESS
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn=DriverManager.getConnection("Jdbc:Odbc:man","","");
Statement stmt=conn.createStatement();
String query="insert into hai VALUES('"+fn+"','"+ln+"','"+Age+"','"+phone+"','"+la+"')";
stmt.executeUpdate(query);
out.println("sucess");
}
catch(Exception e)
{
}
man means its database name
hai means its database table name
0 comments:
Post a Comment