|
-
Dec 31st, 2002, 07:10 AM
#1
Thread Starter
Addicted Member
Help with MSFLEXGRID
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
-
Dec 31st, 2002, 09:55 AM
#2
Fanatic Member
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.
-
Dec 31st, 2002, 10:39 AM
#3
Thread Starter
Addicted Member
This one.
VB Code:
fgMySQLData.DataSource = recs
-
Dec 31st, 2002, 10:47 AM
#4
Fanatic Member
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
It Never Fails. Everytime I try to make a program idiot proof, the world makes a better idiot.
-
Dec 31st, 2002, 11:00 AM
#5
Its the hierarchical flexgrid (MSHFLEXGRID) that supports ado recordsets as a datasource.
-
Dec 31st, 2002, 12:29 PM
#6
Thread Starter
Addicted Member
Nice, if i edit come data on a MSHFlexGrid, will it update the database?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|