Mine rettigheder er i orden, det var en af de første ting jeg undersøgte.
Fejlmeddelsen er: No update permissions!
John
"PP" <pp@no.mail> skrev i en meddelelse
news:64qs7vkstp9g6an8uukmqqsd9o2pmngd3s@4ax.com...
> Du har nok glemt at give databasefilen de rette skriverettigheder.
>
> On Sun, 23 Mar 2003 22:08:40 +0100, "john" <johndk@tiscali.de> wrote:
>
> | Hej venner.
> |
> | Jeg har et lille problem med at skrive til min database. Forbindelsen
er god
> | nok da jeg godt kan trække oplysninger ud af den.
> |
> | ny_info.asp
> |
> | <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
> | <html>
> | <head>
> | <title>Untitled Document</title>
> | <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
> | <link href="../../styles/noerreby.css" rel="stylesheet"
type="text/css">
> | </head>
> |
> | <body class="baggrund01">
> | <div align="center">
> | <form action="add_info.asp" method="post" name="ny_info" id="ny_info">
> | <table width="50%" border="2" cellspacing="3" cellpadding="2">
> | <tr>
> | <td width="32%">StartDato</td>
> | <td width="68%"><input name="startdato" type="text"
> | id="startdato"></td>
> | </tr>
> | <tr>
> | <td>Tekst</td>
> | <td><textarea name="info" cols="40" rows="10"
> | id="info"></textarea></td>
> | </tr>
> | <tr>
> | <td>Slutdato</td>
> | <td><input name="slutdato" type="text" id="slutdato"></td>
> | </tr>
> | <tr>
> | <td colspan="2"><div align="center">
> | <input name="add" type="submit" id="add"
value="Tilføj">
> | <input name="Reset" type="reset" id="Reset" value="Reset">
> | </div></td>
> | </tr>
> | </table>
> | </form>
> | </div>
> | </body>
> | </html>
> |
> | add_info.asp
> |
> | <?xml version="1.0" encoding="iso-8859-1"?>
> | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> | "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> | <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
> | <html xmlns="
http://www.w3.org/1999/xhtml">
> | <head>
> | <title>Untitled Document</title>
> | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>
> | </head>
> |
> | <body>
> | <%
> | ' Definer database variabler
> | Dim sDbFile ' Sti og navn på database
> | Dim bDbIsOpen ' Indikerer om databasen er åben
> | Dim cn ' Database objekt
> | Dim rs ' Recordset objekt
> |
> |
> | ' Initialiser database variabler
> | bDbIsOpen=False
> | sDbFile="../../../../database/noerreby.mdb"
> |
> |
> | ' Åbn database
> | Sub OpenDB()
> | If bDbIsOpen=True Then Exit sub
> | Set cn=Server.CreateObject("ADODB.Connection")
> | cn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
> | Server.MapPath(sDbFile)
> | Set rs=Server.CreateObject("ADODB.Recordset")
> | bDbIsOpen=True
> | End Sub
> |
> |
> | ' Luk database
> | Sub CloseDB()
> | If bDbIsOpen=False Then Exit Sub
> | On Error Resume Next
> | rs.Close
> | Set rs=Nothing
> | Set cn=Nothing
> | bDbIsOpen=False
> | End Sub
> | %>
> |
> | <%
> | OpenDB
> | sql="INSERT INTO meddelser (Startdato,Tekst,Slutdato)"
> | sql=sql & " VALUES "
> | sql=sql & "('" & Request.Form("startdato") & "',"
> | sql=sql & "'" & Request.Form("tekst") & "',"
> | sql=sql & "'" & Request.Form("slutdato")')"
> | on error resume next
> | conn.Execute sql,recaffected
> | if err<>0 then
> | Response.Write("<center>No update permissions!</center>")
> | else
> | Response.Write("<h3>" & recaffected & " record added</h3>")
> | end if
> | conn.close
> | CloseDB
> | %>
> |
> |
> | </body>
> | </html>
> |
> | Hvad er der galt????
> |
> | MVH
> | John
> |
> |
>