access数据库的asp问题-参数不足,期待是1
functionguestAccussfulifGoods=1thenresponse.write"<strong><fontsize=4>Hello!Youarewel...
function guestAccussful
if Goods=1 then
response.write "<strong><font size=4>Hello! You are welcome!!</font></strong><br>"
response.write "<br>I'll answer in no time,Please enjoy the staying.<br>"
else
response.write "<br>Thank you for your "&chooseGoods(Goods-1)
response.write "<br>I'll answer in no time,Please enjoy the staying.<br>"
end if
response.write "<br>Time:"&ndatetime
end function
rem -----------------------
rem ---显示成功函数结束----
rem -----------------------
First_Name=request("First_Name")
Last_Name=request("Last_Name")
Address=request("Address")
City=request("City")
State=request("State")
Zip=request("Zip")
Phone=request("Phone")
Email=request("Email")
Email_Confirm=request("Email_Confirm")
Product_Name=request("Product_Name")
Date_Purchased=request("Date_Purchased")
Where_Purchased=request("Where_Purchased")
Purchase_Price=request("Purchase_Price")
Problem_Question=request("Problem_Question")
%>
<!-- #include file=database.asp -->
<%
if First_Name<>"" then First_Name=replace(First_Name,"'","''")
if Last_Name<>"" then Last_Name=replace(Last_Name,"'","''")
if Address<>"" then Address=replace(Address,"'","''")
if City<>"" then City=replace(City,"'","''")
if State<>"" then State=replace(State,"'","''")
if Zip<>"" then Zip=replace(Zip,"'","''")
if Phone<>"" then Phone=replace(Phone,"'","''")
if Email<>"" then Email=replace(Email,"'","''")
if Email_Confirm<>"" then Email_Confirm=replace(email_Confirm,"'","''")
if Product_Name<>"" then Product_Name=replace(Product_Name,"'","''")
if Date_Purchased<>"" then Date_Purchased=replace(Date_Purchased,"'","''")
if Where_Purchased<>"" then Where_Purchased=replace(Where_Purchased,"'","''")
if Purchase_Price<>"" then Purchase_Price=replace(Purchase_Price,"'","''")
if Problem_Question<>"" then Problem_Question=replace(Problem_Question,"'","''")
con.Execute " INSERT INTO guest " _
& "(First_Name,Last_Name,Address,City,State,Zip,Phone,Email,Email_Confirm,Product_Name,Date_Purchased,Where_Purchased,Purchase_Price,Problem_Question) VALUES " _
& "('" & First_Name &"','" & Last_Name & "','"& Address &"'," & City &",'" & State &"','" & Zip &"','" & Phone &"','" & Email &"','" & Email_Confirm &"','" & Product_Name &"','" & Date_Purchased &"','" & Where_Purchased &"','" & Purchase_Price & "','"& Problem_Question &"');"
con.close
set con=nothing
guestAccussful
%>
说是第 94 行: con.Execute " INSERT INTO guest " _
参数不足,期待是1
请问怎么解决啊?
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] INSERT INTO 语句的语法错误。
http://support.microsoft.com/default.aspx?scid=kb;en-us;216425
http://support.microsoft.com/kb/243834/EN-US/
上面这两个地址有相关的资料, 但我看不懂啊 展开
if Goods=1 then
response.write "<strong><font size=4>Hello! You are welcome!!</font></strong><br>"
response.write "<br>I'll answer in no time,Please enjoy the staying.<br>"
else
response.write "<br>Thank you for your "&chooseGoods(Goods-1)
response.write "<br>I'll answer in no time,Please enjoy the staying.<br>"
end if
response.write "<br>Time:"&ndatetime
end function
rem -----------------------
rem ---显示成功函数结束----
rem -----------------------
First_Name=request("First_Name")
Last_Name=request("Last_Name")
Address=request("Address")
City=request("City")
State=request("State")
Zip=request("Zip")
Phone=request("Phone")
Email=request("Email")
Email_Confirm=request("Email_Confirm")
Product_Name=request("Product_Name")
Date_Purchased=request("Date_Purchased")
Where_Purchased=request("Where_Purchased")
Purchase_Price=request("Purchase_Price")
Problem_Question=request("Problem_Question")
%>
<!-- #include file=database.asp -->
<%
if First_Name<>"" then First_Name=replace(First_Name,"'","''")
if Last_Name<>"" then Last_Name=replace(Last_Name,"'","''")
if Address<>"" then Address=replace(Address,"'","''")
if City<>"" then City=replace(City,"'","''")
if State<>"" then State=replace(State,"'","''")
if Zip<>"" then Zip=replace(Zip,"'","''")
if Phone<>"" then Phone=replace(Phone,"'","''")
if Email<>"" then Email=replace(Email,"'","''")
if Email_Confirm<>"" then Email_Confirm=replace(email_Confirm,"'","''")
if Product_Name<>"" then Product_Name=replace(Product_Name,"'","''")
if Date_Purchased<>"" then Date_Purchased=replace(Date_Purchased,"'","''")
if Where_Purchased<>"" then Where_Purchased=replace(Where_Purchased,"'","''")
if Purchase_Price<>"" then Purchase_Price=replace(Purchase_Price,"'","''")
if Problem_Question<>"" then Problem_Question=replace(Problem_Question,"'","''")
con.Execute " INSERT INTO guest " _
& "(First_Name,Last_Name,Address,City,State,Zip,Phone,Email,Email_Confirm,Product_Name,Date_Purchased,Where_Purchased,Purchase_Price,Problem_Question) VALUES " _
& "('" & First_Name &"','" & Last_Name & "','"& Address &"'," & City &",'" & State &"','" & Zip &"','" & Phone &"','" & Email &"','" & Email_Confirm &"','" & Product_Name &"','" & Date_Purchased &"','" & Where_Purchased &"','" & Purchase_Price & "','"& Problem_Question &"');"
con.close
set con=nothing
guestAccussful
%>
说是第 94 行: con.Execute " INSERT INTO guest " _
参数不足,期待是1
请问怎么解决啊?
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] INSERT INTO 语句的语法错误。
http://support.microsoft.com/default.aspx?scid=kb;en-us;216425
http://support.microsoft.com/kb/243834/EN-US/
上面这两个地址有相关的资料, 但我看不懂啊 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询