Results 1 to 3 of 3

Thread: DATAGRID

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    12
    Please help
    What wrong with this code
    I got error "the rowset is not bookmarkable"

    Private Sub Form_Load()
    Dim cn As new ADODB.Connection
    cn.Open "DSN=mydsn"
    Dim rs As New ADODB.Recordset
    rs.ActiveConnection = cn
    rs.Source = "select * from authors where [year born]>1943"
    rs.Open
    Set DataGrid1.DataSource = rs
    rs.Close
    cn.Close
    Set rs = Nothing
    Set cn = Nothing
    End Sub
    yossi

  2. #2
    Lively Member
    Join Date
    Oct 2000
    Location
    Scotland
    Posts
    96

    Angry

    on what line did you get the error?
    Just trying to muddle through...

  3. #3
    Lively Member PatOls's Avatar
    Join Date
    Oct 2000
    Posts
    99

    Specify type to open

    You must specify how to open the recordset....

    static usually works best in grids

    like:

    rs.open SomeString, cn, adOpenStatic


    /Patrick


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width