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

Thread: datagrid with ado doesnt get populated

  1. #1
    Join Date
    Nov 2002
    Location
    India
    Posts
    9

    Angry datagrid with ado doesnt get populated

    hello
    i want to display records from a query in a datagrid (ole db 6.0).
    i have set up a connection using con.open methoc of ado.
    i am using rs.open method of ado to setup recordset object.
    now i have written following statement:
    set datagrid1.datasource=rs
    but as expected the data grid is not getting populated and doesnt show the records of the query.
    actully the records are successfully being fetched.
    please help.....
    kaprasanna@hotmail.com

  2. #2
    Join Date
    Jan 2003
    Location
    7,107 Islands
    Posts
    2,487
    Try to use client-side cursor for the rs.
    Code:
    rs.CursorLocation = adUseClient
    Busy

  3. #3
    Join Date
    Oct 2002
    Location
    India
    Posts
    103

    Hi

    I had same kinda problem with ado,
    try using dao it works fine.
    Nilesh
    Pune, Maharashtra
    India

  4. #4
    Join Date
    Dec 2003
    Posts
    2

    datagrid1.rebind

    change the code to:
    Code:
    set datagrid1.datasource=rs
    datagrid1.rebind

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)