以下は、SQL Server データベースにデータを挿入するために使用している簡単な asp コードです。以下のエラーが発生します。誰かが見て、このコードのエラーを教えてもらえますか?
<html>
<head>
<title>Address Book Insertion</title>
</head>
<body>
<%
set connection=Server.CreateObject("ADODB.Connection")
connection.Open "Provider=SQLOLEDB;Server=charithj-pc;Integrated Security=SSPI;Initial Catalog=AddressDB;"
cmd = "INSERT INTO AddressBook (FirstName, Surname, Address) VALUES ('"
cmd = cmd & Request("FirstName") & "','"
cmd = cmd & Request("Surname") & "','"
cmd = cmd & Request("Address") & "')"
Response.Write(cmd)
on error resume next
connection.Execute cmd
if err <> 0 then
Response.Write("Insertion failed")
else
Response.Write("Insertion successful")
end if
connection.close
%>
</body>
</html>
Web サイトでページを表示できません
HTTP 500
最も考えられる原因:
•ウェブサイトはメンテナンス中です。
•ウェブサイトにプログラミング エラーがあります。