Try this:
<!--#include file="connection.asp" -->
<%
adddate=now()
name=request.form("name")
email=request.form("email")
ranking=request.form("ranking")
notes=request.form("notes")
if name="" or ranking="" or notes="" then
response.write"الرجاء ادخال جميع الحقول المطلوبة"
else
addSQL="insert into [guestbook] ([date],[name],[email],[ranking],[content]) values('"&adddate&"','"&name&"','"&email&"','"&ranking&"','"¬es&"') "
SB.execute(addSQL)
response.redirect "guest.book.asp"
End if
SB.close
Set SB=Nothing
%>
Also check to make sure that date isn't a reserved keyword, because I believe it is. Change date to datecreated and update the sql statement.
Also check to see if rankings data type. If your column in your msaccess database is integer, you need to remove the SINGLE quotes around rankings in the sql statement. Integers cannot be surrounded by single quotes, otherwise it's considered as a string and will not insert.
SheSaidImaPregy
Veteran Poster
1,080 posts since Sep 2007
Reputation Points: 43
Solved Threads: 68
well I have never heard that one before.
But it is due to permissions. Make sure you have permissions to the folder your database is stored, and also make sure the mdb file isn't write protected or read-only. Then check to make sure your columns aren't bound to other tables, like foreign keys. Basically, make sure you can write to the file mdb, and make sure your columns can be updated.
SheSaidImaPregy
Veteran Poster
1,080 posts since Sep 2007
Reputation Points: 43
Solved Threads: 68