я пытаюсь вставить значение в таблицу, передав значение в функцию
как это:
public void insert(long r,String s_n,char sex,String sf_n,String sm_n,int c,char sec,long tel,long amount,String add,int age,String house)
{
try{
this.ps=this.con.prepareStatement("insert into s_table values(?,?,?,?,?,?,?,?,?,?,?,?);");
this.ps.setLong(1,r);
this.ps.setString(2,s_n);
this.ps.setObject(3,sex,java.sql.Types.CHAR);
this.ps.setString(4,sf_n);
this.ps.setString(5,sm_n);
this.ps.setInt(6,c);
this.ps.setObject(7,sec,java.sql.Types.CHAR);
this.ps.setLong(8,tel);
this.ps.setLong(9,amount);
this.ps.setString(10,add);
this.ps.setInt(11, age);
this.ps.setString(12,house);
this.ps.executeUpdate();
this.ps.close();
con.close();
}catch(SQLException e){System.out.println("The statement is not established while inserting the element bco'z of "+e.getMessage());
e.printStackTrace();}
}
Модель страницы jsp:
но это показывает ошибку усечения данных.
К вашему сведению: соединение установлено