Results 1 to 2 of 2

Thread: flexgrid won't recognize ado on form

Hybrid View

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2000
    Posts
    6
    I'm using an ado to connect to a flexgrid but the when I click the DataSource property on the flexgrid it says "No compatible data source found". ANy ideas?

    Thanks

  2. #2
    Hyperactive Member vbuser1976's Avatar
    Join Date
    Sep 2000
    Location
    Yonkers, NY
    Posts
    404

    Question Hmm...

    From what I understand, if you are using an ADO connection, have you opened a recordset? If you want to do it that way, you would have to set the datasource equal to the recordset after you have opened it. Here's an example:

    Code:
    rs.Open sSQLSelect, gobjConnect, adOpenStatic, adLockBatchOptimistic, adCmdText 
    If Not rs.EOF And Not rs.BOF Then 
    rs.MoveFirst 
    End If 
    
    rs.ActiveConnection = Nothing 
    
    Set FlexGrid1.DataSource = rs
    sSQLSelect could be a string SQL command, table, or stored procedure. gobjConnect is the name of the connection.

    You can read more about this here:
    R U a Datagrid(ADO) Pro?
    Going Crazy!!!

    I hope this helps and Good Luck!
    -vbuser1976
    VB6 Enterprise SP6
    SQL 7.0 SP2
    VBScript, HTML, Javascript, C++, a little UNIX

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