【发布时间】:2011-06-06 22:46:55
【问题描述】:
我得到了以下原始查询
private static final String DB_QUERY_GETPOS = "select f._id, F.FName, F.FArt, P.VName, O.Gebaeude, O.Raum from Faecher as F "
+ "inner join profs as P on F.Prof_ID = P._id "
+ "inner join ort as o on F.ort_id = o._id "
+ "inner join position as PO on PO.pos=? and id is not null where f._id = PO.id and PO.pos=? order by f._id;";
为什么在访问填充了此查询结果的 Cursor 或 ArrayList 对象时会出现ArrayOutofBounds 异常?
为什么? 参数不获取我传递给 rawquery 的参数?
【问题讨论】:
-
能否请您发布访问 arraylist 对象的代码,以及您发送 rawquery 的位置?
-
嗨@John。当我今天完成工作时,我会为你添加这些行......这是一个私人项目,我只在家里得到代码。基本上问题是我在底部的评论中描述的。但到目前为止我可以告诉你的是,查询只是你在 rawquery 调用中看到的字符串 + 带有选择参数的字符串数组。 db.rawquery(DB_QUERY_GETPOS, String[] args);