我收到提示:經典ASP的SQL Server「不允許操作」錯誤
Request object error 'ASP 0104 : 80004005'
Operation not Allowed
/post.asp, line 3
此錯誤試圖寫入我的數據庫後,來了。我添加的代碼是
jquery stuff{
ar2 = useless2.split("Summary");
ar = ar2[0];
re = new RegExp("\n", "g");
useless = ar.replace(re, "<br>");
re = new RegExp('"', "g");
useless = ar.replace(re, '""');
used = useless;
}
html stuff{
<input type="hidden" name="vDescription_' + c + '" value="' + used + '">
}
(是的,我知道用=沒用沒用)
一個什麼樣的描述看起來像一個例子:
<input type="hidden" name="vDescription_323" value="
0:07 Discussion
1:06 Introduction and Motivation
2:24 Support Vector Machines
6:59 The Financial Kernel (FK)
8:28 Kernel Methods
10:10 Example
10:14 Data Selection
10:34 Preprocessing
10:57 Testing
">
這是從檢查的元素拉。我不完全確定爲什麼它會顯示新行而不是
代碼,這可能會導致錯誤?
ASP代碼:
<!--#include file="connv.inc"-->
<%
n=Request.form("total")
response.write(n)
for x = 0 to n-1
ttitle=Request.form("title_"&x)
title=Replace(ttitle, "'", "''")
id=Request.form("id_"&x)
views=Request.form("vViews_"&x)
likes=Request.form("vLikes_"&x)
description=Request.form("vDescription_"&x)
sql="if NOT exists (select * from tbl_videos where videoId = '"&id&"') INSERT INTO tbl_videos(videoTitle, videoId, videoLikes, videoViews, videoDescription, swamCompatible) values ('"&title&"', '"&id&"', '"&likes&"', '"&views&"', '"&description&"', '0')"
connv.execute(sql)
response.write(sql&"<br>")
next
%>
<html>
<head>
<title> Updating Tables </title>
</head>
<body>
</body>
</html>
<!--#include file="closeEmv.inc"-->
你需要顯示post.asp –
@AlexK服務器端代碼。哦,忘了。它已被添加進來。 –
我懷疑第3行涉及到connv.inc –