De melding die ik krijg is:
Soort fout:
Hier onder de bestanden die ik gebruik, ik weet dat het een grote lap tekst is maar goed. ik hoop dat er toch iemand is die een oplossing weet/ de fout ziet.
alvast bedankt..!
De include file:
b_meest.asp
b_meestvraag.asp
Soort fout:
code:
1
2
3
| Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Microsoft][ODBC Microsoft Access-stuurprogramma] De bewerking moet worden uitgevoerd op een query die kan worden bijgewerkt. /groep2/b_meestvraag.asp, line 33 |
Hier onder de bestanden die ik gebruik, ik weet dat het een grote lap tekst is maar goed. ik hoop dat er toch iemand is die een oplossing weet/ de fout ziet.
alvast bedankt..!
De include file:
code:
1
2
3
4
5
6
7
8
9
| <%
function getConnection()
dim con
set con = server.createobject("ADODB.Connection")
con.open("DRIVER=Microsoft Access Driver (*.mdb);DBQ=c:\inetpub\wwwroot\groep2\db\timmerman.mdb;")
set getConnection = con
end function
%> |
b_meest.asp
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
| <%option explicit%>
<!-- #include virtual="/groep2/include/connection.inc" -->
<%
dim connDb, objRS, strAktie, strID
strAktie = trim(request("Aktie"))
strID = 1
select case strAktie
case "Toevoegen"
response.redirect("b_meestvraag.asp?Mutatie=Toevoegen")
case "Wijzigen"
response.redirect("b_meestvraag.asp?Mutatie=Wijzigen&ID="&strID)
case "Verwijderen"
response.redirect("b_meestvraag.asp?Mutatie=Verwijderen&ID="&strID)
case else
call main()
end select
sub Vragen()
dim strVraag, strAntwoord
set ConnDb = GetConnection()
set objRS = connDB.execute("select Vraag, Antwoord from Meestgesteldevraag order by ID")
Do while not objRS.EOF
%>
<tr>
<td>Vraag:</td>
</tr>
<tr>
<td><%=(objRs("vraag"))%></td>
</tr>
<tr>
<td>Antwoord:</td>
</tr>
<tr>
<td><%=(objRs("antwoord"))%></td>
</tr>
<%
objRS.MoveNext
Loop
objRS.close
set objRS = nothing
ConnDb.close
set ConnDb = nothing
end sub
sub main()
%>
<html>
<head>
<title>H.J.Timmerman Beheer</title>
</head>
<body>
<form name="mainform" method="post">
<table border="0" cellspacing="0" cellpadding="0">
<%call vragen()%>
<tr>
<td height=10></td>
</tr>
<tr>
<td><input type="submit" name="Aktie" value="Toevoegen"></td>
<td width="20"></td>
<td><input type="submit" name="Aktie" value="Wijzigen"></td>
<td width="20"></td>
<td><input type="submit" name="Aktie" value="Verwijderen"></td>
</tr>
</table>
</body>
</form>
</html>
<%
end sub
%> |
b_meestvraag.asp
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
| <%option explicit%>
<!-- #include virtual="/groep2/include/connection.inc" -->
<%
dim ConnDb, objRS, strID, strMutatie, strVraag, strAntwoord, strAktie
strMutatie = trim(request("Mutatie"))
strID = trim(request("ID"))
strAktie = trim(request("Aktie"))
select case strAktie
case "Toevoegen"
call Toevoegen()
case "Wijzigen"
call Wijzigen()
case "Verwijderen"
call Verwijderen()
case else
call main()
end select
function dbCheck(strInput)
dbCheck = replace(strInput, "'", "''")
end function
sub Toevoegen()
dim strVraag2, strAntwoord2
strVraag2 = trim(request("Vraag"))
strAntwoord2 = trim(request("Antwoord"))
set ConnDb = GetConnection()
Conndb.execute("insert into Meestgesteldevraag (vraag, antwoord) values ('"&dbcheck(strVraag2)&"', '"&dbcheck(strAntwoord2)&"')")
ConnDb.close
set ConnDb = nothing
end sub
sub Wijzigen()
dim strVraag2, strAntwoord2
strVraag2 = trim(request("Vraag"))
strAntwoord2 = trim(request("Antwoord"))
Conndb.execute("insert into Meestgesteldevraag (vraag, antwoord) values ('"&dbcheck(strVraag2)&"', '"&dbcheck(strAntwoord2)&"') where ID="&strID&"")
ConnDb.close
set ConnDb = nothing
end sub
sub Verwijderen()
set ConnDb = GetConnection()
conndb.execute("delete Meestgesteldevraag where ID="&strID&"")
ConnDb.close
set ConnDb = nothing
end sub
sub main()
if strMutatie = "Toevoegen" then
else
set ConnDb = GetConnection()
set objRS = conndb.execute("select vraag, antwoord from Meestgesteldevraag where ID="&strID&"")
Do while not objRS.EOF
strVraag = (objRs("vraag"))
strAntwoord = (objRs("antwoord"))
objRS.MoveNext
Loop
objRS.close
set objRS = nothing
ConnDb.close
set ConnDb = nothing
end if
%>
<html>
<head>
<title>H.J. Timmerman Beheer</title>
</head>
<form name="mainform" method="post">
<body>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>Vraag:</td>
</tr>
<tr>
<td><textarea cols=75 rows=3 name="Vraag"><%=strVraag%></textarea></td>
</tr>
<tr>
<td>Antwoord:</td>
</tr>
<tr>
<td><textarea cols=75 rows=3 name="Antwoord"><%=strAntwoord%></textarea></td>
</tr>
<tr>
<td><input type="submit" name="Aktie" value=<%=strMutatie%>></td>
<td><input type="submit" name="Aktie" value="Annuleren"></td>
</tr>
</table>
</body>
</form>
</html>
<%end sub%> |