Ik zoek al maanden op dit probleem en het bljift voorkomen. Telkens als ik via dreamweaver een asp-pagina aanmaak dat gegevens moet inserten in een database krijg ik een 500.100 error in internet.
Ik heb al zitten zoeken of de database niet op read-only stond of zo maar dat blijkt het niet te zijn. In IIS heb ik alles aan staan (read, write, script access, execute, directory browsing,...) en ik heb zelf geprobeerd om de IUSR-account voor anonymous access een administrator te maken en ook dat deed niets. Het is een Access-database. Er uit opvragen lukt wel, updaten en inserten niet. Dit is de code van de insert pagina:
Iemand enig idee aan wat dit kan liggen. Via de search vond ik nog mensen met soortgelijke problemen maar die kregen een andere error, ik denk niet dat het hier echt aan de code ligt, eerder aan een instelling van IIS, ik weet alleen helemaal niet meer welke. (sorry voor de layout-screw-up)
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
| The page cannot be displayed There is a problem with the page you are trying to reach and it cannot be displayed. -------------------------------------------------------------------------------- Please try the following: Click the Refresh button, or try again later. Open the localhost home page, and then look for links to the information you want. HTTP 500.100 - Internal Server Error - ASP error Internet Information Services -------------------------------------------------------------------------------- Technical Information (for support personnel) Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement. /newsite/7_Multimedia/1_Forum/new_topic.asp, line 115 Browser Type: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705) Page: POST 68 bytes to /newsite/7_Multimedia/1_Forum/new_topic.asp POST Data: Title=&Author=&Email=&Message=yg&ReplyID=&Type=Topic&MM_insert=form1 Time: 15 August 2003, 18:38:57 More information: Microsoft Support |
Ik heb al zitten zoeken of de database niet op read-only stond of zo maar dat blijkt het niet te zijn. In IIS heb ik alles aan staan (read, write, script access, execute, directory browsing,...) en ik heb zelf geprobeerd om de IUSR-account voor anonymous access een administrator te maken en ook dat deed niets. Het is een Access-database. Er uit opvragen lukt wel, updaten en inserten niet. Dit is de code van de insert pagina:
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
| <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="../../Connections/Lokerse_Feesten.asp" -->
<%
' *** Edit Operations: declare variables
Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd
Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId
Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Request.QueryString
End If
' boolean to abort record edit
MM_abortEdit = false
' query string to execute
MM_editQuery = ""
%>
<%
' *** Insert Record: set variables
If (CStr(Request("MM_insert")) = "form1") Then
MM_editConnection = MM_Lokerse_Feesten_STRING
MM_editTable = "Forum"
MM_editRedirectUrl = "index.asp"
MM_fieldsStr = "Title|value|Author|value|Email|value|ReplyID|value|Message|value|Type|value"
MM_columnsStr = "Title|',none,''|Author|',none,''|E-mail|',none,''|ReplyID|',none,''|Message|',none,''|Type|',none,''"
' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|")
MM_columns = Split(MM_columnsStr, "|")
' set the form values
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i)))
Next
' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
End If
%>
<%
' *** Insert Record: construct a sql insert statement and execute it
Dim MM_tableValues
Dim MM_dbValues
If (CStr(Request("MM_insert")) <> "") Then
' create the sql insert statement
MM_tableValues = ""
MM_dbValues = ""
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_formVal = MM_fields(MM_i+1)
MM_typeArray = Split(MM_columns(MM_i+1),",")
MM_delim = MM_typeArray(0)
If (MM_delim = "none") Then MM_delim = ""
MM_altVal = MM_typeArray(1)
If (MM_altVal = "none") Then MM_altVal = ""
MM_emptyVal = MM_typeArray(2)
If (MM_emptyVal = "none") Then MM_emptyVal = ""
If (MM_formVal = "") Then
MM_formVal = MM_emptyVal
Else
If (MM_altVal <> "") Then
MM_formVal = MM_altVal
ElseIf (MM_delim = "'") Then ' escape quotes
MM_formVal = "'" & Replace(MM_formVal,"'","''") & "'"
Else
MM_formVal = MM_delim + MM_formVal + MM_delim
End If
End If
If (MM_i <> LBound(MM_fields)) Then
MM_tableValues = MM_tableValues & ","
MM_dbValues = MM_dbValues & ","
End If
MM_tableValues = MM_tableValues & MM_columns(MM_i)
MM_dbValues = MM_dbValues & MM_formVal
Next
MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & ") values (" & MM_dbValues & ")"
If (Not MM_abortEdit) Then
' execute the insert
Set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
If (MM_editRedirectUrl <> "") Then
Response.Redirect(MM_editRedirectUrl)
End If
End If
End If
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>
<!--
BODY{
scrollbar-face-color:#DBC7AD;
scrollbar-arrow-color:#665F55;
scrollbar-track-color:#BAAA94;
scrollbar-shadow-color:'';
scrollbar-highlight-color:'#DBC7AD';
scrollbar-3dlight-color:'black';
scrollbar-darkshadow-Color:'black';
}
-->
</style>
<link href="../../Templates/lf2004.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#DBC7AD" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="450" border="0" align="center" cellpadding="0" cellspacing="5" bordercolor="#FFFFFF">
<tr>
<td height="50" valign="bottom"><h1><a href="../../Templates/index.asp">Forum</a>:
Nieuw Topic</h1></td>
</tr>
<tr>
<td valign="top"><p align="left"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"></font></p>
<form method="post" action="<%=MM_editAction%>" name="form1">
<table align="center">
<tr valign="baseline">
<td nowrap align="right"><p>Topic-titel:</p></td>
<td> <input type="text" name="Title" value="" size="32"> </td>
</tr>
<tr valign="baseline">
<td nowrap align="right"><p>Naam:</p></td>
<td> <input type="text" name="Author" value="" size="32"> </td>
</tr>
<tr valign="baseline">
<td nowrap align="right"><p>E-mail:</p></td>
<td> <input type="text" name="Email" value="" size="32"> </td>
</tr>
<tr>
<td nowrap align="right" valign="top"><p>Bericht:</p></td>
<td valign="baseline"> <textarea name="Message" cols="50" rows="5"></textarea>
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right"> </td>
<td> <input type="submit" value="Nieuw Topic"> </td>
</tr>
</table>
<p>
<input type="hidden" name="ReplyID" value="" size="32">
<input type="hidden" name="Type" value="Topic" size="32">
<input type="hidden" name="MM_insert" value="form1">
</p>
</form></td>
</tr>
</table>
</body>
</html> |
Iemand enig idee aan wat dit kan liggen. Via de search vond ik nog mensen met soortgelijke problemen maar die kregen een andere error, ik denk niet dat het hier echt aan de code ligt, eerder aan een instelling van IIS, ik weet alleen helemaal niet meer welke. (sorry voor de layout-screw-up)