爱问知识人 爱问教育 医院库

access数据库的asp问题-参数不足,期待是1

首页

access数据库的asp问题-参数不足,期待是1

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= p --> 
<% 
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 &"');" 
 ose 
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 语句的语法错误。

请问怎么解决啊?

提交回答
好评回答
  • 2006-10-12 16:33:54
    1,我不知道你设的参数的具体类型,像price如果是数值型的,sql语句中就不要加‘’。
    2,如果实在不行,建议先用程序把sql语句打印出来,然后在数据库中手工查询输入,可以看得比较清楚。

    y***

    2006-10-12 16:33:54

类似问题

换一换
  • 数据库 相关知识

  • 电脑网络技术
  • 电脑网络

相关推荐

正在加载...
最新资料 热门专题 热点推荐
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200

热点检索

  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 175-194
返回
顶部
帮助 意见
反馈

确定举报此问题

举报原因(必选):