none
【求救】在做recordset clone的時候,卻跳出 runtime error 3251:recordset不支援bookmark RRS feed

  • 問題

  • 請問最近發生的問題

    Code

    #######################################

    Private Sub conndb_Click()
    Dim ResultSetM As New ADODB.Recordset

    Dim Connection As New ADODB.Connection
    Dim Command As New ADODB.Command

    Dim ResultSet_TempM As New ADODB.Recordset

    ResultSetM.CursorType = adOpenStatic

    Connection.ConnectionString = "driver={SQL Server};server=;........"
    Connection.ConnectionTimeout = 300

    Connection.Open
    Command.ActiveConnection = Connection
    Command.CommandType = adCmdStoredProc
    Command.CommandText = SP_name
    Command.CommandTimeout = 300

    Command.Parameters.Append Command.CreateParameter("flag", adVarChar, adParamInput, 4, "I")
        Command.Parameters.Append Command.CreateParameter("user", adVarChar, adParamInput, 8, "Neo")
        Command.Parameters.Append Command.CreateParameter("cmpy", adVarChar, adParamInput, 4, "BookMarket")
        Command.Parameters.Append Command.CreateParameter("func", adVarChar, adParamInput, 50, "1")

     Set ResultSetM = Command.Execute

    Set ResultSet_TempM = ResultSetM.Clone

    #######################################

    卻跳出錯誤訊息

    「執行階段錯誤:3251

      目前資料錄集(recordset)不支援bookmark。這可能成為provider或所選資料指標類型(cursortype)的限制。

    有沒有解決方法呢??


    Question and Answer just seen like one
    2010年6月8日 上午 03:49

解答

所有回覆