标题:[求助]请问这是什么问题,为什么总报错
取消只看楼主
lihaoru
Rank: 1
等 级:新手上路
帖 子:74
专家分:0
注 册:2004-11-11
 问题点数:0 回复次数:0 
[求助]请问这是什么问题,为什么总报错
Function DataToRsStatic(Conn,strSql)
        Dim RsStatic
        On Error Resume Next
        Set DataToRsStatic = Nothing
        If Conn Is Nothing Then
                Exit Function
        End If
        Set RsStatic = CreateObject("ADODB.RecordSet")
        RsStatic.CursorLocation = 3
        RsStatic.Open strSql,Conn,3,3
        If Err.Number <> 0 Then
                Exit Function
        End If
        Set DataToRsStatic = RsStatic
End Function

Sub Dwclient1_CallerIDComing(CallerID,ConnectStr)
        m_InCallRef = 1
        m_CallerID = ""
        m_InboundCallTime = Now()
        m_CallerID = CallerID
        DialNumber.value = m_CallerID
        m_CallLogID = InsertCallLog(time(), m_CallerID, "")        
        ExtStatus.innerHTML = CallerID + "来电"
          Dim conn
        dim rstData
        Set Conn = CreateObject("ADODB.Connection")
        conn.open "DRIVER={SQL Server};SERVER=192.168.0.100;DATABASE=aaa;UID=sa;PWD=aaa"
          strSql = "SELECT * FROM DW_CUSTOMER where CUS_MOBILE = '" & CallerID & "' or CUS_PHONE = '" & CallerID & "'"
        rstData = DataToRsStatic(conn, strSql)
          If (rstData.EOF) Then
                nam.innerHTML=rstData("CUS_UNIT")
        End if
        rstData.Close
        Set rstData = nothing
        conn.close
        Set conn=Nothing
执行以后老是有错误说:对象不支持此属性或方法:'rstData.EOF'
请问要怎么改,谢谢帮忙一下
2005-10-09 15:17



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-29655-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.148470 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved