日期:2014-05-17  浏览次数:20896 次

asp+sql无法更新
每次提交都提示MicrosoftOLEDBProviderforODBCDrivers(0x80004005)
在语句 "open "附近有关键字错误

不知道是哪里出了问题,是语句出了问题还是库有问题,请高手解答
<%
pname=request( "pname ")  
if   pname= " "   then   Response.End
trade=request( "trade ")
cxz=request( "cxz ")
sex=request( "sex ")
pnames=request( "pnames ")
area=request( "area ")
fdate=request( "fdate ")
fund=request( "fund ")
cname=request( "cname ")
address=request( "address ")
zip=request( "zip ")
phone=request( "phone ")
renshi=request( "renshi ")
rstel=request( "rstel ")
cypic=request( "cypic ")
faren=request( "faren ")
yuangong=request( "yuangong ")
fax=request( "fax ")
email=request( "email ")
http=request( "http ")
pic=request( "pic ")
jianj=htmlencode2(request( "jianj "))
if   fund= " "   then   fund= "未知 "   end   if
if   pic= " "   then   pic= "uppic/nocypic.gif "   end   if
if   cname= " "   then   cname=rs( "cname ")   end   if
if   fax= " "   then   fax= "未知 "   end   if
if   http= " "   then   http= "http:// "   end   if
rs.close
Set   rs   =   Server.CreateObject( "ADODB.Recordset ")
sql= "select   *   from   company   where   uname= ' "&uname& " ' "
rs.open   sql,conn,3,3
rs( "trade ")=trade
rs( "cxz ")=cxz
rs( "area ")=area
rs( "yuangong ")=yuangong
rs( "pnames ")=pnames
rs( "renshi ")=renshi
rs( "rstel ")=rstel
rs( "sex ")=sex
rs( "fdate ")=fdate
rs( "faren ")=faren
rs( "cname ")=cname
rs( "cypic ")=cypic
rs( "fund ")=fund
rs( "pname ")=pname
rs( "address ")=address
rs( "zip ")=zip
rs( "phone ")=phone
rs( "fax ")=fax
rs( "email ")=email
rs( "http ")=http
rs( "pic ")=pic
rs( "jianj ")=jianj
rs( "idate ")=date()
rs.update
rs.close  
问题补充:
conn连接语句
Set   conn   =   Server.CreateObject( "ADODB.Connection ")
conn.open   "driver={SQL   Server};server=(local);UID=sa;PWD=123;Database=hot123 "

------解决方案--------------------
对,1,3