baole
22-02-06, 02:30 PM
用 diiop 存取Lotus数据库时发生的错误
程序运行完后打印出: Document created and saved
但是我在我的数据文档中找不到保存数据?不知道存哪里去了
哪位能教我把数据存入表单table里的name和dress两个域呢?
本人是刚接触这种数据库,所以有很多东西都不懂
谢谢!
public class DIIOPClass{
public static void main(String [] args)
{
try{
Session ss = NotesFactory.createSession("oa:63148","admin","12345678");
Database db = ss.getDatabase(null,"oa\\test.nsf");
Document doc = db.createDocument();
doc.replaceItemValue("name","输入的中文数据");
doc.replaceItemValue("dress","输入的中文数据");
if (doc.save())
System.out.println("Document created and saved");
else
System.out.println("Something went wrong");
ss.recycle();
}
catch(NotesException e)
{
e.printStackTrace();
}catch(Exception e)
{
e.printStackTrace();
}
}
}
程序运行完后打印出: Document created and saved
但是我在我的数据文档中找不到保存数据?不知道存哪里去了
哪位能教我把数据存入表单table里的name和dress两个域呢?
本人是刚接触这种数据库,所以有很多东西都不懂
谢谢!
public class DIIOPClass{
public static void main(String [] args)
{
try{
Session ss = NotesFactory.createSession("oa:63148","admin","12345678");
Database db = ss.getDatabase(null,"oa\\test.nsf");
Document doc = db.createDocument();
doc.replaceItemValue("name","输入的中文数据");
doc.replaceItemValue("dress","输入的中文数据");
if (doc.save())
System.out.println("Document created and saved");
else
System.out.println("Something went wrong");
ss.recycle();
}
catch(NotesException e)
{
e.printStackTrace();
}catch(Exception e)
{
e.printStackTrace();
}
}
}