Siden kan ikke vises?
Jeg har problemer med at indsætte i min access database.Her er min kode:
<%
Mode = Request.Querystring("Mode")
%>
<html>
<head>
<title>Tilføj</title>
</head>
<body bgcolor="#FFFFFF">
<%
If Mode = "add" Then
%>
<%
Set Conn = Server.CreateObject("ADODB.Connection")
DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; "
DSN = DSN & "DBQ=" & Server.MapPath ("soeg.mdb")
Conn.Open DSN
Navn = Replace( Request.Form("Navn"), "'", "''" )
Dato = date()
Beskrivelse = Replace( Request.Form("Beskrivelse"), "'", "''" )
Url = Replace( Request.Form("Url"), "'", "''" )
If Navn = "" OR Url = "" Then
Response.Write " Du skal indtaste et navn og en URL."
Else
sql = "Insert into soeg(Navn, Dato, Beskrivelse, Url) values('" & Navn & "', '" & Dato & "', '" & Beskrivelse & "', '" & Url & "')"
Conn.execute(sql)
Conn.Close
Set Conn = Nothing
Response.redirect "addfilm.asp"
End If
Else
%>
</font>
<form method="POST" action="addfilm.asp&Mode=add">
<font size="2">Indsæt video:</font><font face="Tahoma" size="2"><br>
</font><table border="0" width="100%" height="84">
<tr>
<td width="17%" height="17"><font face="Tahoma" size="2">Navn:</font></td>
<td width="33%" height="17"><font face="Tahoma">
<input type="text" name="Navn" size="35" style="border-style: solid; border-width: 1"></font></td>
<td width="48%" height="17"></td>
</tr>
<tr>
<td width="17%" height="19"><font face="Tahoma" size="2">Url:</font></td>
<td width="33%" height="19"><font face="Tahoma">
<input type="text" name="Url" size="37" style="border-style: solid; border-width: 1"></font></td>
<td width="48%" height="19"> </td>
</tr>
<tr>
<td width="17%" height="11" valign="top"><font face="Tahoma" size="2">Beskrivelse:</font></td>
<td width="33%" height="11"><font face="Tahoma">
<textarea rows="9" name="Beskrivelse" cols="33"></textarea></font></td>
<td width="48%" height="11"></td>
<input type="hidden" name="Nyhed" value="Tilmeldt via hjemmesiden"></font></td>
<td width="63%" height="11"></td>
</tr>
<tr>
<td width="17%" height="11"></td>
<td width="33%" height="11"></td>
<td width="48%" height="11"></td>
<td width="63%" height="11"></td>
</tr>
</table>
<p>
<font face="Tahoma">
<input type="submit" value="Tilføj video" name="B1" style="border-style: solid; border-width: 1"></font></p>
</form>
<%
End If
%>
</body>
</html>
Og her er linket til siden:
http://www.partytube.dk/hockey/addfilm.asp
Siden kan ikke vises ?