0
我使用他们的id.I做泰德retreival中检索数据库从一个字符串,但它返回一些对象格式不作为string.Please帮助我..数据库retreival作为字符串的Android
我retreival地点:
db.open();
for(int i=1;i<=5;i++)
{
if(i==1)
group1=db.getspintitle(1);
if(i==2)
group1=db.getspintitle(2);
if(i==3)
group1=db.getspintitle(3);
if(i==4)
group1=db.getspintitle(4);
if(i==5)
group1=db.getspintitle(5);
}
db.getspintitle()方法:
public String getspintitle(int rowId)throws SQLException
{
String sumtotal="";
Cursor cursor1 = db.rawQuery(
"SELECT spin from spinner WHERE _id='rowId'", null);
sumtotal=cursor1.toString();
cursor1.close();
return sumtotal;
}
是帕雷什Mayani。我如何将它们转换为字符串..因为我必须将此值设置为textview在我的屏幕.. – 2012-07-18 07:05:26
检查更新的答案。请牢记这一点,因为您还必须迭代游标来获取数据。 – 2012-07-18 07:07:37
感谢它的工作/// – 2012-07-18 07:09:37