Rowset not bookmarkable

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bahog
    New Member
    • Feb 2007
    • 12

    Rowset not bookmarkable

    Hi! can anyone tell me what should i do about this error."error 7004 Rowset not bookmarkable". I get this error when i try to set the datasource of a datagrid to recordset i created.
    Code:

    rs.Open "table", connection
    Set Datagrid.DataSo urce = rs
  • cmrhema
    Contributor
    • Jan 2007
    • 375

    #2
    Originally posted by bahog
    Hi! can anyone tell me what should i do about this error."error 7004 Rowset not bookmarkable". I get this error when i try to set the datasource of a datagrid to recordset i created.
    Code:

    rs.Open "table", connection
    Set Datagrid.DataSo urce = rs
    Before setting the datagrid to datasource you should specify the cursor location.
    1. rs.CursorLocati on=adUseClient
    put down the above code before you open the recordset
    thereafter while opening the table also delcare the CursorType and Lock type
    2. rs.Open "select * from table",connecti on, adOpenDynamic, adLockOptimisti c
    lastly set the datasource to the data grid
    3. Set Datagrid.DataSo urce = rs

    So, your code must be in the order 1,2,3

    Check out and let me know whether it worked or not.
    Good Luck

    Comment

    • ansumansahu
      New Member
      • Mar 2007
      • 149

      #3
      Originally posted by bahog
      Hi! can anyone tell me what should i do about this error."error 7004 Rowset not bookmarkable". I get this error when i try to set the datasource of a datagrid to recordset i created.
      Code:

      rs.Open "table", connection
      Set Datagrid.DataSo urce = rs
      Hi ,

      I think you are using ADO. If so please check the cursor location properties.

      thanks
      ansuman

      Comment

      • bahog
        New Member
        • Feb 2007
        • 12

        #4
        Originally posted by cmrhema
        Before setting the datagrid to datasource you should specify the cursor location.
        1. rs.CursorLocati on=adUseClient
        put down the above code before you open the recordset
        thereafter while opening the table also delcare the CursorType and Lock type
        2. rs.Open "select * from table",connecti on, adOpenDynamic, adLockOptimisti c
        lastly set the datasource to the data grid
        3. Set Datagrid.DataSo urce = rs

        So, your code must be in the order 1,2,3

        Check out and let me know whether it worked or not.
        Good Luck

        I tried it and it works.... Thanks....

        Comment

        Working...