Results 1 to 6 of 6

Thread: Help with MSFLEXGRID

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Location
    Carolina, Puerto Rico, USA
    Posts
    227

    Question Help with MSFLEXGRID

    Hello.

    Somewhere here I saw that this could work

    VB Code:
    1. recs.Open "SELECT * FROM tblClient", DBCon, adOpenDynamic, adLockOptimistic
    2. fgMySQLData.DataSource = recs

    But it gives me a Type mismatch error, why?


    Thanks in advance
    NievesJ

  2. #2
    Fanatic Member
    Join Date
    Sep 2000
    Location
    Over There
    Posts
    522
    which particular line give you the error??
    It Never Fails. Everytime I try to make a program idiot proof, the world makes a better idiot.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Location
    Carolina, Puerto Rico, USA
    Posts
    227
    This one.

    VB Code:
    1. fgMySQLData.DataSource = recs
    NievesJ

  4. #4
    Fanatic Member
    Join Date
    Sep 2000
    Location
    Over There
    Posts
    522
    1. the datasource has to be a data control not a recordset.
    2. you have to use the set statement.
    3. It looks like you're trying to assign an ado recordset.
    I believe the flexgrid only use DAO.

    I may be wrong on # 3

    you'll need to do something like this.

    VB Code:
    1. dim rs as recordset
    2.  
    3. 'open the recordset here
    4.  
    5. set YourDataControl.recordset = rs
    It Never Fails. Everytime I try to make a program idiot proof, the world makes a better idiot.

  5. #5
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758
    Its the hierarchical flexgrid (MSHFLEXGRID) that supports ado recordsets as a datasource.

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Location
    Carolina, Puerto Rico, USA
    Posts
    227
    Nice, if i edit come data on a MSHFlexGrid, will it update the database?
    NievesJ

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