Server环境: Domino8.5 + IIS5.0
Client : Notes6.5 + VS.net 2005
--------------------------------------------------------------------------------
//Add reference(COM) Lotus Domino Objects
Domino.IViewNavigator vn;
string pServer="APSRV01/Test";
string pDbFileName="Test.nsf";
string pUser="Admin/Test";
string pPassword="password";
string pNotesView="HelloView";
Domino.IViewEntry h;
Domino.ISession s = new Domino.NotesSession();
Domino.NotesDatabase db;
Domino.NotesView view;
Domino.NotesDocument doc;
Domino.NotesItem item;
s.Initialize(pPassword); //Notes client 当前用户密码
//s.InitializeUsingNotesUserName(pUser, pPassword); //据说是在server机器上使用.
db = s.GetDatabase(pServer, pDbFileName, false);
view = db.GetView(pNotesView);
doc = view.GetFirstDocument();
item = doc.GetFirstItem("HelloItem");
Domino.NotesDocument doc1=db.CreateDocument();
doc1.AppendItemValue("HelloItem", "OK");
doc1.AppendItemValue("Form", "HelloForm");
doc1.ComputeWithForm(true, true);
doc1.Save(true, true,true);
Response.Write(db.Title);
//Response.Write(h.Document.UniversalID);
Response.Write(doc.UniversalID);
Response.Write(item.Text);