I am using this query

sql="select * from student"

if rs.state=1 then rs.close

rs.open sql,strcon,3,3

while not rs.eof

datagrid1.datasource=sql
datagrid1.refresh
wend

where as rs is a recordset variable and strcon defines the connection to the data base.
please guide me for correction

HI,

you can try the coding, this could helpful to u.

sql="select * from student"

if rs.state=1 then rs.close

rs.CursorLocation = adUseClient

rs.open sql,strcon,3,3

Set DataGrid1.DataSource = rs

DataGrid1.Refresh

Shailaja:)

I am using this query

sql="select * from student"

if rs.state=1 then rs.close

rs.open sql,strcon,3,3

while not rs.eof

datagrid1.datasource=sql
datagrid1.refresh
wend

where as rs is a recordset variable and strcon defines the connection to the data base.
please guide me for correction

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.