CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 13 of 13

Thread: Data Grid

  1. #1
    Join Date
    Jul 2001
    Location
    maharashtra,india
    Posts
    181

    Data Grid

    Set db = DAO.Workspaces(0).OpenDatabase(App.Path & "\Database1.mdb")
    Set rd = db.OpenRecordset("Worker", dbOpenDynaset)


    till here it is working fine it is getting connected to Access 2000 database
    now i have DataGrid on my form when i try this code
    datagrid1.datasource = db
    it gives me and error method or data member not found
    what is the problem
    plzz help


  2. #2

    Re: Data Grid


    set datagrid1.datasource = rd




    <center>
    <HR width=80%>
    <img src='http://web.tiscali.it/bertaplanet/im...ertaplanet.gif'>
    </center>

  3. #3
    Join Date
    Jul 2001
    Location
    maharashtra,india
    Posts
    181

    Re: Data Grid

    this is giving me an error
    type mismatch


  4. #4

    Re: Data Grid

    yes.. i thin u must use ADO insted of DAO...
    I think dbgrid.datasource wants a ADODB.recordset...

    hi,brt

    <center>
    <HR width=80%>
    <img src='http://web.tiscali.it/bertaplanet/im...ertaplanet.gif'>
    </center>

  5. #5
    Join Date
    Jul 2001
    Location
    maharashtra,india
    Posts
    181

    Re: Data Grid

    i am not getting Adodb
    i even added Ado refrence it is showing me missing i dont know what is this problem that is y i use dao
    if i use adodc1 then i wont b able to databse with the password


  6. #6

    Re: Data Grid

    R U using a MS DBGrid Control or a MS Data Bound Grid Control?



    <center>
    <HR width=80%>
    <img src='http://web.tiscali.it/bertaplanet/im...ertaplanet.gif'>
    </center>

  7. #7
    Join Date
    Jul 2001
    Location
    maharashtra,india
    Posts
    181

    Re: Data Grid

    ms datagrid control 6.0 (oledb)


  8. #8

    Re: Data Grid

    oledb means ADO...

    so U try using a MS data bound control grid 5.0




    <center>
    <HR width=80%>
    <img src='http://web.tiscali.it/bertaplanet/im...ertaplanet.gif'>
    </center>

  9. #9
    Join Date
    Jul 2001
    Location
    maharashtra,india
    Posts
    181

    Re: Data Grid

    i have databound grid 5.0(sp3)
    will this work


  10. #10
    Join Date
    Jul 2001
    Location
    maharashtra,india
    Posts
    181

    Re: Data Grid

    i have databound grid 5.0(sp3)
    and that is giving me an error
    class doesnot support automation or doesnot supported expeceted interface


  11. #11

    Re: Data Grid

    U must use a DAO data control.
    then at design time set datasourse of dbgrid to your dao data control( using combo)..



    <center>
    <HR width=80%>
    <img src='http://web.tiscali.it/bertaplanet/im...ertaplanet.gif'>
    </center>

  12. #12
    Join Date
    Aug 2001
    Location
    NY, USA
    Posts
    5

    Re: Data Grid

    Try assigning Recordset to the Datagrid data source property
    I think you should say datagrid1.datasource = rd



  13. #13
    Join Date
    Jul 2001
    Location
    maharashtra,india
    Posts
    181

    Re: Data Grid

    nope it is not working


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

Featured