String Query="insert into sms (Jobno, Mobilenumber, MStatus, ReceivedTime, AmountDeducted, Message, DoneTime) values ("+jobnum +","+mobilenum+","+ smsstatus+",'"+ rxtimestamp+ "',"+ amt+",'"+smstxt+"','"+timedone1+"')";
Note: Through the Mysql the above query is executed successfully....
I imported all the required libraries and their respective interfaces in the program.... When i execute through java panel/ide its throwing the following errors?
Exception in thread "main" com.mysql.jdbc.MysqlDataTruncation: Data truncation: Out of range value for column 'Mobilenumber' at row 1
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2983)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3277)
at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1402)
at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1317)
Please suggest what could be the problem...........
The amount of value from the variable mobileNumber is more than its limit. So check the datatype you have defined in both DB and java program and verify the mobileNumber you have given to save.