Click to See Complete Forum and Search --> : Data Grid


urs
August 30th, 2001, 09:55 AM
Set db = DAO.Workspaces(0).OpenDatabase(App.Path & "\Database1.mdb")
Set rd = db.OpenRecordset("Worker", dbOpenDynaset)


till here it is working fine it is getting connected to Access 2000 database
now i have DataGrid on my form when i try this code
datagrid1.datasource = db
it gives me and error method or data member not found
what is the problem
plzz help

berta
August 30th, 2001, 10:15 AM
set datagrid1.datasource = rd




<center>
<HR width=80%>
<img src='http://web.tiscali.it/bertaplanet/images/bertaplanet.gif'>
</center>

urs
August 30th, 2001, 10:18 AM
this is giving me an error
type mismatch

berta
August 30th, 2001, 10:20 AM
yes.. i thin u must use ADO insted of DAO... :(
I think dbgrid.datasource wants a ADODB.recordset...

hi,brt

<center>
<HR width=80%>
<img src='http://web.tiscali.it/bertaplanet/images/bertaplanet.gif'>
</center>

urs
August 30th, 2001, 10:26 AM
i am not getting Adodb
i even added Ado refrence it is showing me missing i dont know what is this problem that is y i use dao
if i use adodc1 then i wont b able to databse with the password

berta
August 30th, 2001, 10:31 AM
R U using a MS DBGrid Control or a MS Data Bound Grid Control?



<center>
<HR width=80%>
<img src='http://web.tiscali.it/bertaplanet/images/bertaplanet.gif'>
</center>

urs
August 30th, 2001, 10:34 AM
ms datagrid control 6.0 (oledb)

berta
August 30th, 2001, 10:36 AM
oledb means ADO...

so U try using a MS data bound control grid 5.0




<center>
<HR width=80%>
<img src='http://web.tiscali.it/bertaplanet/images/bertaplanet.gif'>
</center>

urs
August 30th, 2001, 10:42 AM
i have databound grid 5.0(sp3)
will this work

urs
August 30th, 2001, 10:44 AM
i have databound grid 5.0(sp3)
and that is giving me an error
class doesnot support automation or doesnot supported expeceted interface

berta
August 30th, 2001, 10:59 AM
U must use a DAO data control.
then at design time set datasourse of dbgrid to your dao data control( using combo)..



<center>
<HR width=80%>
<img src='http://web.tiscali.it/bertaplanet/images/bertaplanet.gif'>
</center>

shahp
August 30th, 2001, 11:12 AM
Try assigning Recordset to the Datagrid data source property
I think you should say datagrid1.datasource = rd

urs
August 30th, 2001, 11:20 AM
nope it is not working