Fejl:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver]General error Unable to
open registry key 'Temporary (volatile) Jet DSN for process 0x638
Thread 0x738 DBC 0x22d1284 Jet'.
/message_post.asp, line 7
message_post.asp Kode:
<%
Const adOpenKeyset = 1
Const adLockOptimistic = 3
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "PROVIDER=MSDASQL;DRIVER={Microsoft Access Driver
(*.mdb)};DBQ=" & Server.MapPath("mdb/nyheder.mdb") &
";UID=admin;PWD=;"
Set rs = Server.CreateObject("ADODB.RecordSet")
strSQL = "Select * From nyheder"
rs.Open strSQL, Conn, adOpenKeyset, adLockOptimistic
rs.AddNew
rs("overskift") = Request.form("overskrift")
rs("email") = Request.form("email")
rs("navn") = Request.form("navn")
rs("nyhed") = Request.form("nyhed")
rs("dato") = date()
rs.Update
rs.Close
Set rs = Nothing
Conn.Close
set Conn = Nothing
%>
<html>
<META HTTP-EQUIV="Refresh" CONTENT="0;URL=nyhed.asp">
</html>
tilfoej.asp Kode:
<html>
<head>
<title></title>
</head>
<body>
<div align=center>
<form action="message_post.asp" method="POST">
<table width=355 border=1 cellpadding=10 cellspacing=0>
<tr>
<td>
<table width=355 border=0 cellpadding=0 cellspacing=5>
<tr>
<td colspan=2><center>skriv nyhed</center></td>
</tr>
<tr>
<td>overkskrift:</td><td><input type=text maxlenght=255
name=overskrift></td>
</tr>
<tr>
<td>e-mail:</td><td><input type=text name=email></td>
</tr>
<tr>
<td>navn</td><td><input type=text name=navn></td>
</tr>
<tr>
<td valign=top>nyhed:</td>
<td><textarea id=textarea name=nyhed cols=45
rows></textarea>
<table width=450 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=225 valign=middle align=center><input type=submit
value=post></td><td width=225 valign=middle align=center><input
type=reset value=nustil></td>
</tr>
</table>
</form>
hjæææææælp
--
Vil du lære at kode HTML, XHTML, CSS, SSI eller ASP?
- Pædagogiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! =>
http://www.html.dk/tutorials