Run time Error 7004 : Row set is not bookmarkable

vb6 India
  • 15 years ago

    This was the code I have written....

    Code:

    Dim rs1 as new adodb.recordset
    Private Sub Command1_click
    dim connstr ,cmdtext as string
    connstr = "Provider = MSDAORA.1;Driver = {Microsoft ODBC for Oracle};Server=;database = beq-local.world;userid=scott;password = tiger;Persist Security Info = True"


    cmdtext = "SELECT * FROM MY_TABLE"


    rs1.open cmdtext,connstr


    set datagrid1.datasource = rs1
    end sub



    Upto the rs1.open statement it works fine..but at the line
    set datagrid1.datasource = rs1


    It gives error
    Runtime Error : 7004
    The rowset is not bookmarkable


    What is the cause of this error and ahow to prevent it ?

  • 15 years ago

    Jyoti,
    U forgot to set the CursorLocation Property of Recordset Object.
     
        rs.CursorLocation=adUseClient


    Hey  just copy this code line before openign ur recordset.


    U'll through.
    Bye.

  • 8 years ago

    Tank you for giving me this solution. Its working.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“There are 10 types of people in the world, those who can read binary, and those who can't.”