我想在数据库中保存10位数字,但保存后,当显示数字时,存储的数字存储为其他数字
抱歉我的英语很差获取号码:
long studentId = Long.parseLong(studentId_et.getText().toString());
database.OpenDatabase();
database.SaveStudent(studentId , classId , studentName);
database.close();
保存号码:
public void SaveStudent(long studentId, int classID, String studentName) {
Cursor cursor = database.rawQuery("select * from " + tblName_Student + " where student_id = ?",
new String[]{String.valueOf(studentId)});
if (cursor.getCount() == 0)
{
ContentValues values = new ContentValues();
values.put("student_id", studentId);
values.put("class_id", classID);
values.put("student_name", studentName);
database.insert("student", null, values);}