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

在线 等 你的答复 速度
Microsoft   VBScript   运行时错误   (0x800A01C2)
错误的参数个数或无效的参数属性值:   'Rs '
/shopping/index.asp,   第   30   行

我很菜   你看哪不对   直接改   谢谢     最好这部分代码全给我改好了

我的代码:

<%
Set   Con=Server.CreateObject( "ADODB.connection ")
          Con.Open= "File   Name=C:\Inetpub\wwwroot\shopping\data\db.udl "  
action=trim(Request( "action "))
xm=trim(Request( "xm "))
sheng=trim(Request( "sheng "))
shi=trim(Request( "shi "))
xz=trim(Request( "xz "))
cun=trim(Request( "cun "))
mph=trim(Request( "mph "))
yb=trim(Request( "yb "))
gzdw=trim(Request( "gzdw "))
lxdh=trim(Request( "lxdh "))
dzyx=trim(Request( "dzyx "))

if   action= "index "   then   checkpass=true
if   len(xm) <1   then   checkpass=false
if   len(sheng) <1   then   checkpass=false
if   len(shi) <1   then   checkpass=false
if   len(xz) <1   then   checkpass=false
if   len(cun) <1   then   checkpass=false
if   len(yb) <1   then   checkpass=false
if   len(gzdw) <1   then   checkpass=false
if   len(lxdh) <1   then   checkpass=false
if   len(dzyx) <1   then   checkpass=false

Set   Rs=Server.CreateObject( "ADODB.Connection ")
query= "select   xm   from   xinxi   where   xm= ' "+xm+ " ' "
Rs.Open   query,Con,1,3
rs( "xm ")=xm
rs( "sheng ")=sheng
rs( "shi ")=shi
rs( "xz ")=xz
rs( "cun ")=cun
rs( "mph ")=mph
rs( "yb ")=yb
rs( "gzdw ")=gzdw
rs( "lxdh ")=lxdh
rs( "dzyx ")=dzyx

rs.update
rs.close
Response.Redirect "/shopping/index.asp "

%>



------解决方案--------------------
Con.Open "File Name=C:\Inetpub\wwwroot\shopping\data\db.udl " '要确保Con打开
...
query= "select * from xinxi where xm= ' " & xm & " ' "