请看看这段代码在access转到sql后order by部分为什么出错?
fsyxb 2004-01-18 10:06:11 sql="SELECT cixv,acct FROM paiku where (queren=0 and acct<>0) order by acct desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
i=1
if not(Rs.Bof OR Rs.Eof) then
do while not rs.eof
rs("cixv")=i
i=i+1
rs.update
rs.movenext
loop
rs.close
else
response.end
end if
以上代码在access中用没有问题,但转到sql后,执行此代码时提示出错:
ADODB.Recordset 错误 '800a0cb3'
Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.
但只要把“order by acct desc”部分去掉就能正常执行了,后来试了几次,发现如果在select中使用order by,当要写入数据时就会出错,不写入就没问题。如果要写入数据,就不能使用order by,请问是什么缘故?