Results 1 to 3 of 3

Thread: DATAGRID Question

  1. #1

    Thread Starter
    Hyperactive Member razzaj's Avatar
    Join Date
    Oct 1999
    Location
    jounieh
    Posts
    261

    DATAGRID Question

    I have a form with a DataGrid ...

    How can I fill it WITHOUT having to Use ADODC data controls or any other data control ...

    I want to be able to create My own Connections..
    and Recordset ... Like this...

    Dim Conn as new ADODB.COnnection
    Dim Rec as new ADODB.Recordset

    Blablabla

    Set DataGrid.SOMETHING = Rec


    That Something is usually DataSource...

    But it keeps giving me the following error "Recordset is not bookmarkable"

    ... I DONT GIVE A DAMN ABOUT IT BEEING BOOKMARKABLE OR NOT !!!
    - regards -
    - razzaj -

  2. #2
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Hi

    Try using a flexgrid or list box .....


    You can fill either (flex seems better) with data from an ADODB connection

    Regards

    Vince

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  3. #3
    New Member
    Join Date
    Mar 2002
    Location
    Chile
    Posts
    2

    Post

    Dim Cn As ADODB.Connection
    Dim Rs As ADODB.Recordset
    Dim conex As String

    Set Cn = New ADODB.Connection

    conex = "Provider=Microsoft.jet.oledb.3.51; Data Source =" & App.Path & "\" & "mydatabase.mdb"

    Cn.ConnectionString = conex

    'This avoids the error: The rowset is not bookmarkable
    Cn.CursorLocation = adUseClient

    Cng.Open

    Set Rs = Cn.Execute("mytable")

    Set DataGrid1.DataSource = Rs
    Mack Cl

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