how to display data in Datagrid through ADO Connection?

I am new to vb. I want code for displaying data in datagrid through ADO Connection.
Thanks in Advanc
[110 byte] By [abhit_kumar] at [2007-11-20 10:13:32]
# 1 Re: how to display data in Datagrid through ADO Connection?
Look for just about any ADO example that uses a FlexGrid control.
Easiest way to do it the right way.
dglienna at 2007-11-9 19:35:22 >
# 2 Re: how to display data in Datagrid through ADO Connection?
Thanks for the reply.

Now, in which situation i am standing right now.

I have done with connection with database. and done with recordset.

but which property of datagrid or how recordset will be in the datagrid?

i want some code for that.

Thanks in Advance.
abhit_kumar at 2007-11-9 19:36:33 >
# 3 Re: how to display data in Datagrid through ADO Connection?
Hi :wave: ,

Try this...

dim cn as new adodb.connection
dim rs as new adodb.recordset

'open connection as required

rs.open "select * from my_table",cn
set datagrid1.datasource = rs

'All records with be shown...

'To clear use

Set datagrid1.datasource = nothing

Enjoy...Have fun :rolleyes:
manu.patel at 2007-11-9 19:37:29 >
# 4 Re: how to display data in Datagrid through ADO Connection?
Thanks Manu Patel,
Its working now...we r proud to be indian, like u...
also make proud for gujarati

bye and tc
abhit_kumar at 2007-11-9 19:38:29 >
# 5 Re: how to display data in Datagrid through ADO Connection?
r u gujrati?
manu.patel at 2007-11-9 19:39:28 >
# 6 Re: how to display data in Datagrid through ADO Connection?
Yes, I am Gujarati. I am also Patel.
abhit_kumar at 2007-11-9 19:40:27 >
# 7 Re: how to display data in Datagrid through ADO Connection?
Don't forget to Rate the post if you satisfied.

And nice to talk to you...:wave:



.
manu.patel at 2007-11-9 19:41:31 >
# 8 Re: how to display data in Datagrid through ADO Connection?
Hello all,

I got one another issue.

another issue is that which i got after two or three days later.

when i click on button to display data in datagrid.

error is given at

set datagrid1.datasource = rs

Run-time Error: 7004
error: "The rowset is not bookmarkable"

Please help
abhit_kumar at 2007-11-9 19:42:29 >