Akut databaseadgangsproblem!
Jeg kan simpelthen ikke få denne form til at lægge sig ind i databasen! Jeg har ikke brug for password eller andet - de indtastede oplysninger skal blot lægge sig ind uden nogen former for check!Jeg bliver ved med at få denne fejl:
Response object error \'ASP 0156 : 80004005\'
Header Error
The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content.
Hvis nogen vil rette scriptet - ville jeg blive lykkelig... :-)
**********her kommer scriptet**********
<%
Response.Buffer = true
catnavn = Request(\"catnavn\")
adresse = Request(\"adresse\")
navn = Request(\"navn\")
alder = Request(\"alder\")
kon = Request(\"kon\")
Const adOpenKeyset = 1
Const adLockOptimistic = 3
Conn.Open \"PROVIDER=MSDASQL;DRIVER={Microsoft Access Driver (*.mdb)};DBQ=\" & Server.MapPath(\"/log/users.mdb\") & \";UID=admin;PWD=;\"
Set rs = Server.CreateObject(\"ADODB.RecordSet\")
strSQL = \"Select * From denmark\"
rs.Open strSQL, Conn, adOpenKeyset, adLockOptimistic%>
<% if Request.ServerVariables(\"REQUEST_METHOD\") = \"POST\" then
if catnavn = \"\" then
Response.Write(\"<span class=\'skrift\'><font color=\'#FF3300\'>Du skal vælge et catnavn<br></font></span>\")
end if
if catnavn <> \"\" then
rs.AddNew
rs(\"catnavn\") = Request.form(\"catnavn\")
rs(\"adresse\") = Request.form(\"adresse\")
rs(\"navn\") = Request.form(\"navn\")
rs(\"alder\") = Request.form(\"alder\")
rs(\"kon\") = Request.form(\"kon\")
rs(\"email\") = Request.form(\"email\")
rs(\"telefon\") = Request.form(\"telefon\")
rs(\"website\") = Request.form(\"website\")
rs(\"om\") = Request.form(\"om\")
rs(\"hits\") = \"0\"
rs.update
Response.Redirect(\"adduser.asp\")
end if
end if %>
<form method=\"post\" action=\"adduser.asp\" id=form name=form>
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td width=\"140\" valign=\"top\" class=\"skrift\">Topic:</td>
<td>
<input type=\"text\" name=\"catnavn\" value=\"\" maxlength=\"255\" class=\"bottom\" size=\"50\">
</td>
</tr>
<tr>
<td width=\"140\" valign=\"top\" class=\"skrift\">adresse:</td>
<td>
<input type=\"text\" name=\"adresse\" value=\"\" maxlength=\"255\" class=\"bottom\" size=\"50\">
</td>
</tr>
<tr>
<td width=\"140\" valign=\"top\" class=\"skrift\">navn:</td>
<td>
<input type=\"text\" name=\"navn\" value=\"\" size=\"50\" maxlength=\"255\" class=\"bottom\">
</td>
</tr>
<tr>
<td width=\"140\" valign=\"top\" class=\"skrift\">text:</td>
<td>
<input type=\"text\" name=\"alder\" maxlength=\"255\" size=\"50\" class=\"bottom\">
</td>
</tr>
<tr>
<td width=\"140\" valign=\"top\" class=\"skrift\">Køn:</td>
<td>
<select name=\"kon\" class=\"bottom\" size=\"1\">
<option value=\"-\" selected>(Vælg)</option>
<option value=\"Mand\">Mand</option>
<option value=\"Kvinde\">Kvinde</option>
</select>
</td>
</tr>
<tr>
<td width=\"140\" valign=\"top\" class=\"skrift\">Email:</td>
<td>
<input type=\"text\" name=\"email\" value=\"\" size=\"50\" maxlength=\"255\" class=\"bottom\">
</td>
</tr>
<tr>
<td width=\"140\" valign=\"top\" class=\"skrift\">telefon:</td>
<td>
<input type=\"text\" name=\"telefon\" value=\"\" size=\"50\" maxlength=\"255\" class=\"bottom\">
</td>
</tr>
<tr>
<td width=\"140\" valign=\"top\" class=\"skrift\">Website:</td>
<td>
<input type=\"text\" name=\"website\" value=\"http://\" size=\"50\" maxlength=\"255\" class=\"bottom\">
</td>
</tr>
<tr>
<td width=\"140\" valign=\"top\" class=\"skrift\">Fritekst:</td>
<td>
<textarea name=\"om\" rows=\"8\" cols=\"100\" class=\"bottom\"></textarea>
</td>
</tr>
<tr>
<td width=\"110\" valign=\"top\"> </td>
<td>
<input type=\"submit\" value=\"Registrér\" class=\"bottom\">
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p> </p>
</body>
</html>