Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2004
    Posts
    2

    Unanswered: Bind an OLE DB rowset to a data grid

    Hi. I try to connect to a Microsoft SQL database using Ole Db - IRowSet interface. This works, but I can't bind it to a grid control (I use Microsoft Datagrid control).
    I have:
    IRowset* pRowset;
    DDX_Control(pDX, IDC_DATAGRID1, m_grid);
    ........................................
    I try to bind by
    m_grid.SetRefDataSource((LPUNKNOWN)pRowset);
    but it raises an exception : Type mismatch.
    Well, I tried... Could someone help me?
    Gabi
    Last edited by poptcat; 08-02-04 at 05:23. Reason: to receive replies as emails

  2. #2
    Join Date
    Jun 2004
    Location
    Deutschland
    Posts
    10
    i dont work with Ole DB, but you can take a look at
    HTML Code:
    http://www.codeproject.com/database/#OLE+DB
    they have lots of examples, and perhaps, you find what you need...

    deviant69

Posting Permissions

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