how to view record in ms access using vb.net
3 posters
Page 1 of 1
how to view record in ms access using vb.net
try
Dim SqlQuery As String = "SELECT * FROM FullNameTable"
Dim SqlCommand As New OleDbCommand
Dim SqlAdpter As New OleDbDataAdapter
Dim TABLE As New DataTable
With SqlCommand
.CommandText = SqlQuery
.Connection = conn
End With
With SqlAdpter
.SelectCommand = SqlCommand
.Fill(TABLE)
End With
For i = 0 To TABLE.Rows.Count - 1
With ListView1
.Items.Add(TABLE.Rows(i)("ID"))
With .Items(.Items.Count - 1).SubItems
.Add(TABLE.Rows(i)("FirstName"))
.Add(TABLE.Rows(i)("MiddleName"))
.Add(TABLE.Rows(i)("LastName"))
End With
End With
Next
Catch ex As Exception
MsgBox(ex.Message)
End Try
Dim SqlQuery As String = "SELECT * FROM FullNameTable"
Dim SqlCommand As New OleDbCommand
Dim SqlAdpter As New OleDbDataAdapter
Dim TABLE As New DataTable
With SqlCommand
.CommandText = SqlQuery
.Connection = conn
End With
With SqlAdpter
.SelectCommand = SqlCommand
.Fill(TABLE)
End With
For i = 0 To TABLE.Rows.Count - 1
With ListView1
.Items.Add(TABLE.Rows(i)("ID"))
With .Items(.Items.Count - 1).SubItems
.Add(TABLE.Rows(i)("FirstName"))
.Add(TABLE.Rows(i)("MiddleName"))
.Add(TABLE.Rows(i)("LastName"))
End With
End With
Next
Catch ex As Exception
MsgBox(ex.Message)
End Try
putayputay- Newbie
- Posts : 10
Join date : 2013-03-09
Re: how to view record in ms access using vb.net
can you post the search code ?
fredo2503- Newbie
- Posts : 1
Join date : 2013-03-22
Re: how to view record in ms access using vb.net
this is also the code for searching recordfredo2503 wrote:can you post the search code ?
putayputay- Newbie
- Posts : 10
Join date : 2013-03-09
Similar topics
» how to insert/add record in ms access using vb.net
» how to delete record in ms access using vb.net
» how to update record in ms access using vb.net
» help me vb.net whent try record in access 2013
» How to connect Ms Access to vb.net
» how to delete record in ms access using vb.net
» how to update record in ms access using vb.net
» help me vb.net whent try record in access 2013
» How to connect Ms Access to vb.net
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|