Import the dll that contains the Domino namespace: Interop. Domino. dll.
Install the notes client.
Accessing domino starts with creating a NotesSession object. So the first problem is the initialization of the NotesSession object. The Initialize (string password) method of the NotesSession object is intuitive but confusing, because even people who have never been in touch with domino know how to create a session. The user name and password are required, the method here has only one password parameter. The reason here does not need to be further investigated, because the notes client will find the user name information based on the user. id file in the system, and the password part is the thing to verify. If you have worked in domino development, you should have a deeper understanding of this part.
Obtain the data list from the domino data file and sort it into the able.
1 NotesSession ns = new NotesSession ();
2 ns. Initialize ("password ");
3 if (ns! = Null)
4 {
5 db = ns. GetDatabase ("DOMINO server address", "data file address", false );
6 view = db. GetView ("view name ");
7 NotesDocument doc = view. GetFirstDocument ();
8 DataTable dt = new DataTable ();
9 DataColumn dc = new DataColumn ("column name 1 ");
10 dt. Columns. Add (dc );
11 dc = new DataColumn ("column name 2 ");
12 dt. Columns. Add (dc );
13 while (doc! = Null)
14 {
15 DataRow dr = dt. NewRow ();
16 Object [] oba = (Object []) doc. ColumnValues;
17 string colm1, colm2;
18 colm1 = oba [0]. ToString ();
19 colm2 = oba [1]. ToString ();
20 dr. BeginEdit ();
21 dr ["column name 1"] = colm1;
22 dr ["column name 2"] = colm2;
23 & nbs