在android中使用java代码更新数据

在android中使用java代码更新数据,java,android,mysql,propertyinfo,Java,Android,Mysql,Propertyinfo,如果必须在mysql数据库中插入数据,则表示我们使用以下代码: PropertyInfo unameProp =new PropertyInfo(); unameProp.setName("userName");//Define the variable name in the web service method unameProp.setValue(selectedItem);//Define value for fname variable unameProp.setType(String

如果必须在mysql数据库中插入数据,则表示我们使用以下代码:

PropertyInfo unameProp =new PropertyInfo();
unameProp.setName("userName");//Define the variable name in the web service method
unameProp.setValue(selectedItem);//Define value for fname variable
unameProp.setType(String.class);//Define the type of the variable
request.addProperty(unameProp);

这里使用了addproperty…如何在android中编写更新mysql数据库中数据的代码…请帮助我…

android支持sqlite

在android中,必须使用内容值来插入db

    ContentValues values = new ContentValues();
     values.put("userName", selectedItem); 



     db.insert(yrtbl, null, values);
     db.close();

Android不支持mysql。你是说服务器端吗?android中的MySQL并不是最简单的方法…是的,我知道…我必须在这里调用soap Web服务。请参考以下链接:给我解决方案