<% session.LCID = 1030 Response.Expires =-1 Set dbCon2 = Server.CreateObject("ADODB.Connection") DSN = "Driver={Microsoft Access Driver (*.mdb)};" & "DBQ="&Request.ServerVariables("APPL_PHYSICAL_PATH")&"\data\PersonTest.mdb;" & "DefaultDir="&Request.ServerVariables("APPL_PHYSICAL_PATH")&"\data\;" LOGIN = "" PASS = "" dbCon2.Open DSN Set RS2 = Server.CreateObject("ADODB.Recordset") sql = "SELECT Sheet1.ep, Sheet1.PrimeNavn, Sheet1.secnavn, Sheet1.rolle FROM Sheet1 WHERE (Sheet1.secnavn)<>'0'" Set RS = Server.CreateObject("ADODB.Recordset") Set RS2 = Server.CreateObject("ADODB.Recordset") ' response.write(sql) RS.Open sql,dbCon2,3,3 do while not RS.eof sql = "(select t1.name from homeent.person t1 where t1.name = '"&Replace(RS("PrimeNavn"), "'", "''")&"') union (select t2.alias from homeent.person_alias t2 where t2.alias = '"&Replace(RS("PrimeNavn"), "'", "''")&"') " ' response.write(sql)& "
" RS2.Open sql,dbCon if not RS2.eof then response.write(RS("PrimeNavn")& " ("&RS("rolle")&") i epsiode "&RS("ep")&" som primær navn
") RS2.close sql = "(select t1.name from homeent.person t1 where t1.name = '"&Replace(RS("secNavn"), "'", "''")&"') union (select t2.alias from homeent.person_alias t2 where t2.alias = '"&Replace(RS("secNavn"), "'", "''")&"') " ' response.write(sql)& "
" RS2.Open sql,dbCon if not RS2.eof then response.write(RS("PrimeNavn")& " ("&RS("rolle")&") i epsiode "&RS("ep")&" som sekundært navn
") RS2.close RS.movenext loop RS.close set RS = Nothing set RS2 = Nothing %>