am using vb6
but i can't hwo to vie the data base content in data grid
Here is my code
Dim cn1 As ADODB.Connection
Dim rs1 As ADODB.Recordset
Dim ser As String
ser = ("select * from student where ID='" & Text5.Text & "'")
Set cn1 = New ADODB.Connection
cn1.Provider = "Microsoft.Jet.OLEDB.4.0"
cn1.Open "F:\Personal\Sumith\Study\My project\Vb project\adodc conection through code\student.mdb"
Set rs1 = New ADODB.Recordset
rs1.Open ser, cn1, adOpenStatic
If rs1.EOF And rs1.BOF Then
MsgBox "No record found"
End If
Set DataGrid1.DataSource = rs1
DataGrid1.Refresh
snairsumith
0
Newbie Poster
Recommended Answers
Jump to Postbut i can't hwo to vie the data base content in data grid
Is that typing mistake? Anyway about Datagrid and MS Access DB you can read previous solved thread on such topic. It was discussed many times.
thanks
All 3 Replies
Reply to this topic
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.