<% Dim Conn, RS, RS2 Set Conn = CreateObject("ADODB.Connection") Set RS = CreateObject("ADODB.Recordset") Set RS2 = CreateObject("ADODB.Recordset") antalskuespillere = 0 XLFile = "c:\domains\cob.cc\wwwroot\exceltest.xls" szSQL = "select * from [Sheet1$] where type is not null" Conn.ConnectionString = "DBQ=" & XLFile & ";DRIVER=Microsoft Excel Driver (*.xls);UID=admin;" Conn.Open rs.cursortype = 3 ' adStatic. '## open the recordset rs.open szSQL, conn while not rs.eof if RS("type") = "A" then antalskuespillere = antalskuespillere+1 response.write RS("Navn") & "
" if len(RS("rolle")) > 1 then aliasnr = instr(1, RS("rolle"), " (as") if aliasnr > 0 then alias = MID(RS("rolle"),aliasnr+5,LEN(RS("rolle"))-(aliasnr+5)) rolle = MID(RS("rolle"),1,aliasnr-1) response.write (rolle & " (oprettet under alias'et "&alias &")
") else response.write RS("Rolle") & "
" end if end if response.write RS("Type") & "
" if antalskuespillere < 8 then response.write (antalskuespillere &"
") navn = Replace(RS("navn"), "'", "''") alias = Replace(RS("alias"), "'", "''") sql = "select homeent.person_api.check_exist('"&navn&"') as pcheck, homeent.person_api.check_exist('"&alias&"') as aliascheck from dual" RS2.Open sql,dbCon if RS2("pcheck") = "TRUE" then response.write("Personen er oprettet
") if RS2("aliascheck") = "TRUE" then response.write("Personen er oprettet med sit alias
") response.write ("

") rs.movenext wend RS.close Set RS=nothing '## Disconnect recordset, eliminate connection Conn.Close Set Conn=nothing %>