Ways to export Lotus users (with ASP technology)

xiaoxiao2021-03-06  59

How does the Lotus user information is guided to Access? I have a method here that first leads user information to a text file and then outputs the following programs to the Access file.

<% 'This program is used to analyze some of the information from the user information exported from OA and store it in the database. 'Note 1: The file that needs to be copied to copy to another text file. Otherwise, you can't get the correct result. 'Note 2: Returns a "null" string if the user's information does not exist. 'August 2004 Liu Jincai set fso = server.createObject ("scripting.filesystemObject") cfn = server.mappath ("tttt.txt") set fff = fsgetfile (cfn) set mmm = fff.openastextStream (1) IF Not mmm.atendofstream kiln cout = mmm.readall End IF

Set db = server.createObject ("adodb.connection") dbpath = server.mappath ("oamail.mdb") constr = "driver = {Microsoft Access Driver (* .mdb)}; dbq =" & dbpathdb.open constrDB. Execute "delete from oamail" set = server.createObject ("adoDb.recordset") rs.open "Select * from oamail where id is null", db, 3, 2

UUU = Split (Cout, "$ revisions:") hhh = 0set mmm = NothingSet FFF = NothingSet FSO = Nothing

For i = 0 to Ubound (UUU) WANGRUI = UUU (i) XM = GetAinfo (WANGRUI, "Lastname:", VBCR) Un = GetaInfo (WANGRUI, "ShortName:", VBCR) DW1 = GetAinfo (WANGRUI, "Fullname: ", VBCR) DW = getAinfo (DW1," OU = "," / O ") IF xm <>" null "and un <>" null "and dw <>" null "Then Rs.AddNew RS (" XM " ) = XM RS ("un") = UN RS ("DW") = dw hhh = HHH 1 end if Next

rs.Updaters.closedb.closset = NothingSet DB = Nothing

'Intercepted a substring' sstring from a string: Subtrive 'FSTR: Subtrive starting flag strings (not included in substrings)' ESTR: Subtrings End flag strings (not included In substrings) Function GetAinfo (SString, FSTR, ESTR) TMPSTR = "NULL" ln1 = INSTR (1, SString, FSTR) IF ln1> 0 THEN LN2 = INSTR (Ln1 Len (FSTR), SSTRING, ESTR) IF LN2> 0 THENTMPSTR = MID (SSTRING, LN1 LEN (FSTR), LN2-LN1-Ln (FSTR)) end if end if getainfo = tmpstr End function%> Operation end! Take a total of <% = HHH%> strip information!

转载请注明原文地址:https://www.9cbs.com/read-117184.html

New Post(0)