Fejl når jeg skal ligge noget ned i en datbase?
hej jeg får følgende fejl:Microsoft JET Database Engine error '80004005'
Operation must use an updateable query.
/test3/add_date.asp, line 34
når jeg prøver at adde en aftale til en kalender
http://www.test.coutbound.dk/test3/
et er ved følgende kode det går galt:
29 if rs.eof then antal = 0 else antal = result("antal")
30
31 if antal<8 then
32
33 StrSql2 ="INSERT INTO calendar (dte, text_field) values (#" & request("view_date") & "#, '" & chkString(request("navn")) & "')"
34 my_conn.Execute (strSql2)
Det hele er her:
my_conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& server.mappath("webcalendar.mdb")
'Check to see if it's a new record to be added or an old one to update
StrSql= "Select * from calendar where dte = #" & Request("view_Date") & "#"
strSql= "select * from calendar where month(dte) = " & month(Request("view_date")) & " AND day(dte) = "&day(request("view_date"))
set rs = my_conn.Execute (StrSql)
strSQL = "SELECT Count(navn) as antal from yearlycal GROUP by dte HAVING dte=#"&request("view_date")&"#"
set result = my_conn.execute(strSQL)
if rs.eof then antal = 0 else antal = result("antal")
if antal<8 then
StrSql2 ="INSERT INTO calendar (dte, text_field) values (#" & request("view_date") & "#, '" & chkString(request("navn")) & "')"
my_conn.Execute (strSql2)
' SQL sætning opbygges
strSQL = "Insert into yearlycal (dte, navn, gruppe, email, initial) values (#" & Request("view_date") & "#, '" &chkString(Request.Form("navn")) & "' , '" &chkString(Request.Form("gruppe")) & "' , '" &chkString(Request.Form("email")) & "' , '" &chkString(Request.Form("initial")) & "' )"
my_conn.execute(strSQL)
else%>
<script>
alert("Fy kun 8 pr dag");
location.href="index.asp?view_date=<%=request("view_date")%>";
</script>
<%
Response.end
håber nogle kan hjælpe!
