datagrid in vb 6.0
Visual Basic
1
Posts
1
Posters
0
Views
1
Watching
-
The problem is , the data from database is not getting displayed into the datagrid. I am using the following code. Set con = New ADODB.Connection Set rs = New ADODB.Recordset Dim sql As String con.Provider = "Microsoft.Jet.OLEDB.4.0" con.Open "C:\Documents and Settings\Administrator\Desktop\New Folder\db1.mdb" sql = "Select * from student" With rs .Fields.Append "name", adBSTR .Fields.Append "roll", adInteger .Open End With Set dg1.DataSource = rs Thank You Pankaj Garg