站内搜索: 请输入搜索关键词

当前页面: 开发资料首页J2ME 专题J2ME数据库问题,老是报InvalidRecordIDException。

J2ME数据库问题,老是报InvalidRecordIDException。

摘要: J2ME数据库问题,老是报InvalidRecordIDException。


[wtkrun] javax.microedition.rms.InvalidRecordIDException
[wtkrun] at javax.microedition.rms.RecordStore.findRecord(+86)
[wtkrun] at javax.microedition.rms.RecordStore.getRecord(+22)
[wtkrun] at com.fastmobile.crake.model.ByteDatabase.getRecord(+13)
[wtkrun] at com.fastmobile.crake.model.ContactDatabase.put(+123)
[wtkrun] at com.fastmobile.crake.model.ContactDatabase.putFromNetwork(+29)
[wtkrun] at com.fastmobile.crake.controller.AddressBookHandler.parseAddrResponse(+825)
[wtkrun] at com.fastmobile.crake.controller.AddressBookHandler.handleAddrBookResponse(+23)
[wtkrun] at com.fastmobile.crake.controller.AddressBookHandler.handleServerMessage(+90)
[wtkrun] at com.fastmobile.crake.controller.MessageDispatcher.dispatchMessage(+150)
[wtkrun] at com.fastmobile.crake.controller.MessageDispatcher.handleExtSvcMessage(+22)
[wtkrun] at com.fastmobile.crake.controller.MessageDispatcher.handleExtSvcFragment(+210)
[wtkrun] at com.fastmobile.crake.controller.MessageDispatcher.handleExtSvcMessage(+11)
[wtkrun] at com.fastmobile.crake.controller.MessageDispatcher.run(+34)

查了一下资料,一般情况下是当记录被删除的时候会报这个错。可是实际代码

synchronized (m_store)
{
boolean isUpdate = m_store.findRecord(I_ADDR_ID, (byte) 4, id);
if (isUpdate)
{
oldDetails = new ContactDetails(m_store.getRecord(), m_store.getDataLength());
else
oldDetails=null;
}
}

已经被锁定了,而且确实没有任何删除操作在别的进程中,所以不知道为什么总是抛出这个错,请不吝赐教!


它报的是无效的记录号,那就看看记录号有没有问题


RMS


↑返回目录
前一篇: 关于6270手机
后一篇: 关于时间的问题,请教大家