. NET reads the Lotus Domino file database

Source: Internet
Author: User

Domino has components that support. NET, although the feeling of support is not very good, but can be used, the way to install components is very simple, in NuGet online search Domino, and then install as needed.

Development, to install the Notes client on the development machine, many online, here do not repeat, directly on the simple read code:

1notessession NS =Newnotessession ();2             //NS. Initialize ("test1234");3 NS. Initialize ();4             if(ns = =NULL)5             {6MessageBox.Show ("failed to initialize");7                 return;8             }9             //http://10.31.100.50TenNotesDatabase db = ns. Getdatabase ("",@"Names.nsf",false); One             if(db = =NULL) A             { -MessageBox.Show ("failed to initialize database"); -                 return; the             } -              -StringBuilder SB =NewStringBuilder (); -  +Notesview view = db. GetView ("$users"); -             Object[] cols =view. ColumnNames; +dictionary<int,Object> dic =Newdictionary<int,Object>(); A             if(Cols! =NULL) at             { -                 intIX =0; -                 foreach(ObjectObjinchcols) -                 { - DiC. Add (ix, obj); -                     if(obj! =NULL) sb. Append (string. Format ("{0}\r\n", obj)); inix++; -                 } to             } +Notesviewentry ve = view. Getentrybykey ("12345"); -             if(ve! =NULL) the             { *                 intIX =0; $                 Object[] Objs =ve. Columnvalues;Panax Notoginseng                 foreach(ObjectObjinchObjs) -                 { thekeyvaluepair<int,Object> kv = dic. FirstOrDefault (m = M.key = =ix); +Type TP =obj. GetType (); A                     if(TP.) Name.contains ("object[]")) the                     { +                         intIK =0; -                         Object[] Nobjs = (Object[]) obj; $                         foreach(ObjectNobjinchNobjs) $                         { -Sb. Append (string. Format ("{0}[{1}] value is: {2}\r\n", KV. Value, IK, nobj)); -ik++; the                         } -                     }Wuyi                     Else the                     { -Sb. Append (string. Format ("{0} value is: {1}\r\n", KV. Value, obj)); Wu                     } -ix++; About                 } $  -}

. NET reads the Lotus Domino file database

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.