opdatere record
hejsa her er min kode, jeg kan ikke få den til at opdatere den record som jeg vælger.?<% language = vbscript %>
<% Response.Buffer = True %>
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1252\">
<meta name=\"GENERATOR\" content=\"Microsoft FrontPage 5.0\">
<meta name=\"ProgId\" content=\"FrontPage.Editor.Document\">
<title>Ny side 1</title>
</head>
<body>
<table>
<td valign=\"top\" width=\"340\" colspan=\"2\">
<p align=\"center\"><font color=\"#000000\" face=\"Tahoma\" size=\"4\">Beboer:</font>
<form>
<select size=\"1\" name=\"beboer\">
<option value=\"Erik\">Erik i nr. 1</option>
<option value=\"Kim\">Kim i nr. 2</option>
<option value=\"Jens\">Jens i nr. 3</option>
<option value=\"Oda\">Oda i nr. 4</option>
<option value=\"Peter\">Peter i nr. 5</option>
<option value=\"John\">John i nr. 6</option>
<option value=\"Inge\">Inge i nr. 7</option>
<option value=\"Gerda\">Gerda i nr. 8</option>
<option value=\"Omar\">Omar i nr. 9</option>
<option value=\"Henry\">Henry i nr. 10</option>
<option value=\"Aksel\">Aksel i nr. 11</option>
<option value=\"Gregers\">Gregers i nr. 12</option>
<option value=\"Christian\">Christian i nr. 12</option>
<option value=\"Polle\">Polle i nr. 13</option>
<option value=\"Palle\">Palle i nr. 14</option>
<option value=\"Ruth\">Ruth i nr. 15</option>
<option value=\"Gertrud\">Gertrud i nr. 16</option>
<option value=\"Conni\">Conni i nr. 17</option>
<option value=\"Henrik\">Henrik i nr. 18</option>
<option value=\"Michael\">Michael i nr. 19</option>
<option value=\"Nicolaj\">Nicolaj i nr. 20</option>
<option value=\"Erik\">Webmaster</option>
</select><input type=\"submit\" value=\"OK\">
</form>
<table><tr>
<%
if Request.QueryString(\"beboer\") <> \"\" then
brugernavn = Request.QueryString(\"beboer\")
Set Conn = Server.CreateObject(\"ADODB.Connection\")
Conn.Open \"DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=\" & Server.MapPath (\"dber/kalender.mdb\")
strSQL = \"SELECT * From beboer WHERE Brugernavn=\'\"& brugernavn & \"\'\"
set Rs = Conn.execute(strSQL)
response.write brugernavn
%>
</td>
</tr>
<tr>
<td valign=\"top\" width=\"170\">
<p align=\"center\"><font size=\"2\" face=\"Tahoma\" color=\"#000000\">Navn:
</font></p>
</td>
<td valign=\"top\" width=\"170\">
<font size=\"2\" face=\"Tahoma\">
<input type=\"text\" name=\"navn\" size=\"30\" value=\"<%=Rs(\"navn\")%>\"></font>
</td>
</tr>
<tr>
<td valign=\"top\" width=\"170\" align=\"center\">
<font size=\"2\" face=\"Tahoma\">Email:</font>
</td>
<td valign=\"top\" width=\"170\">
<font size=\"2\"
face=\"Tahoma\">
<input type=\"text\" name=\"Email\" size=\"30\" value=\"<%=Rs(\"Email\")%>\"></font>
</td>
</tr>
<tr>
<td valign=\"top\" width=\"170\" align=\"center\">
<font size=\"2\" face=\"Tahoma\">Brugernavn:</font>
</td>
<td valign=\"top\" width=\"170\">
<font size=\"2\"
face=\"Tahoma\">
<input type=\"text\" name=\"Brugernavn\" size=\"30\" value=\"<%=Rs(\"Brugernavn\")%>\"></font>
</td>
</tr>
<tr>
<td valign=\"top\" width=\"170\" align=\"center\">
<font size=\"2\" face=\"Tahoma\">Husnummer:</font>
</td>
<td valign=\"top\" width=\"170\">
<font size=\"2\"
face=\"Tahoma\">
<input type=\"text\" name=\"husnummer\" size=\"30\" value=\"<%=Rs(\"husnummer\")%>\"></font>
</td>
</tr>
<tr>
<td valign=\"top\" width=\"170\" align=\"center\">
<font size=\"2\" face=\"Tahoma\">Password:</font>
</td>
<td valign=\"top\" width=\"170\">
<font size=\"2\"
face=\"Tahoma\">
<input type=\"text\" name=\"password\" size=\"30\" value=\"<%=Rs(\"password\")%>\"></font>
</td>
</tr>
<tr>
<td valign=\"top\" width=\"170\" align=\"center\">
<font size=\"2\" face=\"Tahoma\">Adresse:</font>
</td>
<td valign=\"top\" width=\"170\">
<font size=\"2\"
face=\"Tahoma\">
<input type=\"text\" name=\"adresse\" size=\"30\" value=\"<%=Rs(\"adresse\")%>\"></font>
</td>
</tr>
<tr>
<td valign=\"top\" width=\"170\" align=\"center\">
<font size=\"2\" face=\"Tahoma\">Postnr</font>
</td>
<td valign=\"top\" width=\"170\">
<font size=\"2\"
face=\"Tahoma\">
<input type=\"text\" name=\"postnr\" size=\"30\" value=\"<%=Rs(\"postnr\")%>\"></font>
</td>
</tr>
<tr>
<td valign=\"top\" width=\"170\" align=\"center\">
<font size=\"2\" face=\"Tahoma\">Fødselsår:</font>
</td>
<td valign=\"top\" width=\"170\">
<font size=\"2\"
face=\"Tahoma\">
<input type=\"text\" name=\"fodselsaar\" size=\"30\" value=\"<%=Rs(\"fodselsaar\")%>\"></font>
</td>
</tr>
<tr>
<td valign=\"top\" width=\"170\" align=\"center\">
<font size=\"2\" face=\"Tahoma\">Billed:</font>
</td>
<td valign=\"top\" width=\"170\">
<font size=\"2\"
face=\"Tahoma\">
<input type=\"text\" name=\"billed\" size=\"30\" value=\"<%=Rs(\"billed\")%>\">
</td>
</tr>
<td colspan=\"2\">
<p align=\"center\"><font color=\"#000000\" face=\"Tahoma\">
</table>
</table>
<a href=\"adminbeboer3_nick.asp?mode=ret\">Opdater Databasen</a><br>
<% if request(\"mode\") = \"ret\" then
Set Conn = Server.CreateObject(\"ADODB.Connection\")
Conn.Open \"DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=\" & Server.MapPath (\"dber/kalender.mdb\")
strSQL = \"SELECT * From beboer WHERE Brugernavn=\'\"& brugernavn & \"\'\"
set RS = conn.execute( strSQL )
Navn = Request(\"Navn\")
Email = Request(\"Email\")
Brugernavn = Request(\"Brugernavn\")
husnummer = Request(\"husnummer\")
password = Request(\"password\")
adresse = Request(\"adresse\")
postnr = Request(\"postnr\")
fodselsaar = Request(\"fodselsaar\")
billed = Request(\"billed\")
Set Opdater = Server.CreateObject(\"ADODB.Recordset\")
Opdater.Open SQL, Conn, 1, 3
Opdater(\"Navn\") = Navn
Opdater(\"Email\") = Email
Opdater(\"Brugernavn\") = Brugernavn
Opdater(\"husnummer\") = husnummer
Opdater(\"password\") = password
Opdater(\"postnr\") = postnr
Opdater(\"fodselsaar\") = fodselsaar
Opdater(\"billed\") = billed
Opdater.Update
objRS.Close
objConn.Close
Set objRS = Nothing
Set objConn = Nothing
response.write (\"Opdateret\")
End If
%>
<% else
response.write (\"Vælg den person du vil opdatere, og klik ok!\")
end if
%>
</body>
</html>