Hello.
Somewhere here I saw that this could work
VB Code:
recs.Open "SELECT * FROM tblClient", DBCon, adOpenDynamic, adLockOptimistic fgMySQLData.DataSource = recs
But it gives me a Type mismatch error, why?
Thanks in advance
Printable View
Hello.
Somewhere here I saw that this could work
VB Code:
recs.Open "SELECT * FROM tblClient", DBCon, adOpenDynamic, adLockOptimistic fgMySQLData.DataSource = recs
But it gives me a Type mismatch error, why?
Thanks in advance
which particular line give you the error??
This one.
VB Code:
fgMySQLData.DataSource = recs
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:
dim rs as recordset 'open the recordset here set YourDataControl.recordset = rs
Its the hierarchical flexgrid (MSHFLEXGRID) that supports ado recordsets as a datasource.
Nice, if i edit come data on a MSHFlexGrid, will it update the database?