с вашим VARCHAR вам также может потребоваться указать длину, или обычно она равна
Как насчет того, чтобы захватить текст, жалить его, а затем поместить его в запрос с
String TableName = "ComplicatedTableNameHere";
EditText editText1 = (EditText) findViewById(R.id.EditTextIDhere);
String editTextString1 = editText1.getText().toString();
ВНИЗ
String TableName = "ComplicatedTableNameHere";
//sets the table name as a string so you can refer to TableName instead of writing out your table name everytime
EditText editText1 = (EditText) findViewById(R.id.EditTextIDhere);
//gets the text from your edit text fieldfield
//editText1 = your edit text name
//EditTextIDhere = the id of your text field
String editTextString1 = editText1.getText().toString();
//sets the edit text as a string
//editText1 is the name of the Edit text from the (EditText) we defined above
//editTextString1 = the string name you will refer to in future
, затем используйте
/* Insert data to a Table*/
myDB.execSQL("INSERT INTO "
+ TableName
+ " (Column_Name, Column_Name2, Column_Name3, Column_Name4)"
+ " VALUES ( "+EditTextString1+", 'Column_Value2','Column_Value3','Column_Value4');");
Надеюсь, это поможет кое-что ...
ПРИМЕЧАНИЕ каждая строка находится в пределах
'"+stringname+"'
это 'и', которые включают многострочный элемент srting, без него вы просто получите первую строку, даже не будучи уверенным, что вы получите всю строку, это может быть просто первое слово