Run-time Error '7004'
The rowset is not bookable

解决方案 »

  1.   

    以下是我在VB6.0中调用存储过程的代码,大家帮忙给看看,我在SQL查询分析器里面执行都没问题,可是在程序中他报上面的错误,其中P_LB_Search是存储过程的名称,Description和10是传入的参数Public Conn As New ADODB.Connection
    Public Rs As New ADODB.RecordsetPrivate Sub Command1_Click()
    Conn.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False; ......"
    Conn.Open
    P_Value = "exec P_LB_Search Description,10"
    Set Rs = Conn.Execute(P_Value)
    Set DataGrid1.DataSource = Rs
    End Sub
      

  2.   

    junki(『打破沙锅问到底』) :
    帮我该该好吗,我也不知道具体错在哪了,在哪改! 头一次用存储过程就出现了这个问题,以前都是直接用sql语句写得,都没有这样的问题!
    谢谢了!
      

  3.   

    你应该把你要记录的变量赋给Rs.BOOKMARK呀
      

  4.   

    Public Conn As New ADODB.Connection
    Public Rs As New ADODB.RecordsetPrivate Sub Command1_Click()
    Conn.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False; ......"
    Conn.Open
    rs.CursorLocation=adUseClient
    rs.open p_value,conn
    Set DataGrid1.DataSource = Rs
    End Sub
      

  5.   

    少了一句
    P_Value = "exec P_LB_Search Description,10"