try {
//����JDBC_Connection���getConnection����������ݿ�
conn = JDBC_Connection.getConnection();
//�����ݵ�sql���
String sql =
"insert into cars(carnumber,cartype,color,price,rentprice,deposit,isrenting,description) values(?,?,?,?,?,?,?,?)";
pstm = conn.prepareStatement(sql);
pstm.setString(1, carsVo.getCarnumber());
pstm.setString(2, carsVo.getCartype());
pstm.setString(3, carsVo.getColor());
pstm.setDouble(4, carsVo.getPrice());
pstm.setDouble(5, carsVo.getRentprice());
pstm.setDouble(6, carsVo.getDeposit());
pstm.setInt(7, carsVo.getIsrenting());
pstm.setString(8, carsVo.getDescription());
pstm.executeUpdate();//�ύpstm����
System.out.println("��ӳɹ�����ӵ��������£�");
System.out.println();
刚开始使用myeclipse导入项目的时候没有出现这个问题?这是突然出现的问题,不知道是不是我不小心按了什么地方。
我试过网上好心人提供中文乱码解决方法,但是还是没有解决!只能请求各路大神的指点一下小弟。在这里先谢谢了!各位大神
分享至: