954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How can i retrieve records from data base in data grid through unbound coding

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

electrosoul456
Newbie Poster
2 posts since Jul 2008
Reputation Points: 10
Solved Threads: 1
 

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

manoshailu
Junior Poster
105 posts since Jun 2007
Reputation Points: 34
Solved Threads: 10
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You