Request.Form与Request.QueryString的问题
'我分别用post和get方式插入数据,当数据有空值时get成功,post出错,现实错误标准表达式中数据类型不匹配。 dim room_id,rTime,lTime,pNum,rNum,user,phone,order_no,other
'post请求获取参数
room_id =request.Form("id")
rTime = request.Form("regdate") '这个为空值时失败
lTime = request.Form("leadate")
pNum = request.Form("roomNum")
rNum = request.Form("peopleNum")
user = request.Form("user")
phone = request.Form("phone")
other = request.Form("other")
'get请求时获取参数
'room_id = trim(request.QueryString("id"))
'rTime = trim(request.QueryString("regdate"))’这个为空值时成功
'lTime = trim(request.QueryString("leadate"))
'pNum = trim(request.QueryString("roomNum"))
'rNum = trim(request.QueryString("peopleNum"))
'user = trim(request.QueryString("user"))
'phone = trim(request.QueryString("phone"))
'other = trim(request.QueryString("other"))
dim sql,rs,n
sql ="insert into list(order_no,room_id,date_in,date_out,name,phone,p_num,r_num,other,time_in) values('"&order_no&"','"&room_id&"','"&rTime&"','"&lTime&"','"&user&"','"&phone&"','"&pNum&"','"&rNum&"','"&other&"',#"&now&"#)"
conn.execute(sql),n