import java.sql.*;
class ProductAdd
{
		public static void main(String arg[])
		{    
			Connection con; Statement st; ResultSet rs;
			try
			{    
				System.out.println("正在连接数据库");
				Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
				con=DriverManager.getConnection("jdbc:odbc:aaa","sa","");
				System.out.println("Already Connected to database");
				st=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
								   ResultSet.CONCUR_UPDATABLE);
				String sql="insert into product values(99,'kdkdkdk',777,999)";
				st.executeUpdate(sql);
				System.out.println("已经写入了一行:"); 
				st.close();
				con.close();
			}
			catch(ClassNotFoundException e){System.out.println(e.toString());}
			catch(SQLException e){System.out.println(e.toString());}
		}
}
