Hello guys,
I am new in ASP, ADO and IIS, but I find a good tutorial in w3schools. I've started reading the ADO tutorial, because I want to create a simple web page, which is connected to a database.
I will use Access database (.mdb).
So, I've created two web pages. First one is for importing the data in fields, this data should be imported in the Access database. Second one is for importing the data from the fields to the database.
Here the code for the first page:
<html>
<body>
<form method="post" action="input.asp">
<table>
<tr>
<td>Номер на протокола:</td>
<td><input name="protocolid"></td>
</tr><tr>
<td>Номер на клиента:</td>
<td><input name="clientid"></td>
</tr><tr>
<td>Име на клиента:</td>
<td><input name="clientname"></td>
</tr><tr>
<td>Дата на посещение:</td>
<td><input name="date"></td>
</tr><tr>
<td>Проблем:</td>
<td><input name="problem"></td>
</tr><tr>
<td>Решение:</td>
<td><input name="solution"></td>
</tr><tr>
<td>Коментар:</td>
<td><input name="comment"></td>
</tr><tr>
<td>Служител отишъл на мястото:</td>
<td><input name="employee"></td>
</tr><tr>
<td>Слежител на фирмата приел протокола:</td>
<td><input name="contactperson"></td>
</tr>
</table>
<br /><br />
<input type="submit" value="Добави протокола">
<input type="reset" value="Изчисти">
</form>
</body>
</html>
Here is the code for the second page:
<html>
<body>
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "D:\Inetpub\wwwroot\Protocols.mdb"
sql="INSERT INTO Protocols(ClientID,ClientName,"
sql=sql & "Date,Problem,Solution,Comment,Employee,ContactPerson)"
sql=sql & " VALUES "
sql=sql & "('" & Request.Form("clientID") & "',"
sql=sql & "'" & Request.Form("clientName") & "',"
sql=sql & "'" & Request.Form("date") & "',"
sql=sql & "'" & Request.Form("problem") & "',"
sql=sql & "'" & Request.Form("solution") & "',"
sql=sql & "'" & Request.Form("comment") & "',"
sql=sql & "'" & Request.Form("employee") & "',"
sql=sql & "'" & Request.Form("contactperson") & "')"
on error resume next
conn.Execute sql,recaffected
if err<>0 then
Response.Write("No update permissions!")
else
Response.Write("<h3>" & recaffected & " record added</h3>")
end if
conn.close
%>
</body>
</html>
So, my problem is that I get this error: "No update permissions!"
I've saw that this error happen really often, but there is not any solutions of it.
I've tried a lot of thing to solve the problem, like set permissions to database for IUSR_machine and EVERYONE; copy the database in the other place and so on.
Can you please help me with this problem?
Thank you!