Catalog c = new Catalog("MyCatalog.MYxx.DATA", Catalog.CREATE); |
int j = 0; Catalog c = new Catalog("MyCatalog.MYxx.DATA", Catalog.CREATE); if (!c.isOpen()) return; DataStream ds = new DataStream(c); j = c.addRecord(6); ds.writeString("Fred"); j = c.addRecord(6); ds.writeString("Lucy"); ds.close(); c.close(); |
c = new Catalog("MyCatalog.MYxx.DATA", Catalog.READ_ONLY); ds = new DataStream(c); if (!c.isOpen()) { edtEmail.setText("Not open!"); return; } else { count = c.getRecordCount(); } for (int i = 0; i < count; i++) { c.setRecordPos(i); edtNames.setText(edtNames.getText() + " " + ds.readString()); } ds.close(); c.close(); |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |