zoukankan      html  css  js  c++  java
  • C#访问Domino资料库

         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);

  • 相关阅读:
    发送短信验证(防刷新)
    JsRender 学习总结
    JsRender (js模板引擎)
    jQuery中ready与load事件的区别
    web端图片文件直传
    2018面对对象_作业三
    2018面对对象_作业二
    2018面对对象_作业一
    2018寒假作业_4(自我总结)
    2018寒假作业_3(电梯版本二)
  • 原文地址:https://www.cnblogs.com/hannover/p/2303895.html
Copyright © 2011-2022 走看看