Microsoft OLE DB Provider for ODBC Drivers (0x80040E07)
[Microsoft][ODBC SQL Server Driver][SQL Server]从字符串转换为 smalldatetime 数据类型时发生语法错误。
我的代码:
m_uptype=m_uptype&","&m_uptype1
m_Intro = checkStr(rTrim(Request.Form("txtIntro")))
if Request.Querystring("action")="Insert" then
m_SQL = "Select * From CityCard_League Where username='"&m_UserName&"'"
Set rs = conn.Execute(m_SQL)
if not rs.Eof then
rs.Close
call msgbox("对不起,该用户名已存在,请更换用户名后再试",1)
else
rs.Close
m_Sql = "Insert Into CityCard_League(username,password,name,iscard,operation,payclass,grade,hangyeid,stateid,cityid,traffic,Consume,linkman,startbusinesstime,endbusinesstime,starttime,endtime,businesstimecontent,tbtj,tel,cabaretgrade,address,website,car,tuijian,agio,agiocontent,content,adddate,ischecked,logo,logo1,logo2,logo3,logo4)"
m_Sql = m_Sql + "Values('"&m_UserName&"','"&m_Password&"','"&m_CompanyName&"','"&m_uptype&"','"&m_Operation&"','"&m_PayClass&"','"&m_Grade&"',"&m_TradeType&","&m_CityTypeID&","&m_AreaTypeID&",'"&m_Traffic&"','"&m_Consume&"','"&m_Linkman&"','"&m_BusinessHours&"','"&m_BusinessHours2&"','"&m_YouhuiTime&"','"&m_YouhuiTime2&"','"&m_Other&"','"&m_Tbtj&"','"&m_Tel&"',"&m_StarGrade&",'"&m_Address&"','"&m_Website&"','"&m_Car&"','"&m_Commend&"','"&m_Agio&"','"&m_AgioContent&"','"&m_Intro&"','"&now&"',1,'"&m_Image&"','"&m_Image1&"','"&m_Image2&"','"&m_Image3&"','"&m_Image4&"')"
conn.Execute(m_Sql)
提示是最后这一行出错了!这怎么解决阿?
參考答案:变量的数据类型starttime,endtime,businesstimecontent不合乎标准