tuojing 发表于 2009-10-21 15:35:37

vbscipt rs.recordcount的值总是等于-1救命啊

Dim Cmd, res,money
Set Cmd = CreateObject("ADODB.COMMAND")
   Cmd.ActiveC
Set res = createobject("ADODB.RECORDSET")
   Cmd.CommandType = 1
      Cmd.CommandText ="select rtrim(t.fpadamount,'.') as afrom fpadetail t ,baseuser b where b.usrid= t.usrid and b.usrname='truck' "
   Setres = Cmd.Execute()
   
   If res.Recordcount<>-1 Then
   money=res(0)
   else
       money = 0
   End If
    MsgBox res.Recordcount
Set res = nothing
Set Cmd.ActiveConnection = nothing
Set Cmd= nothing


其他都没问题,就是res.Recordcount总是=-1上面判断无效

tuojing 发表于 2009-10-21 15:53:23

没有高手么,我是新手啊,来个高高手解决下啊

blueeagle9999 发表于 2009-10-26 11:13:11

游标的问题
Rs.open sqlstatement,Cnn,1,1
页: [1]
查看完整版本: vbscipt rs.recordcount的值总是等于-1救命啊