hobbes2103
Active member
- Joined
- Jul 10, 2003
- Messages
- 43
Hello!
I have this code :
Dim myConnection As New OleDb.OleDbConnection
Dim myCommand As New OleDb.OleDbCommand
Dim myReader As OleDb.OleDbDataReader
Dim myConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Database.mdb"
myConnection = New OleDb.OleDbConnection(myConnectionString)
myConnection.Open()
Dim mySelect As String = "SELECT name, birthdate FROM MyTable"
myCommand = New Oledb.OleDbCommand(mySelect, myConnection)
myReader = myCommand.ExecuteReader()
End Sub
I want my datagrid to show the names and birthdates when I press on button1. How do I do that?
(as you have already guessed, Im a beginner so if you know the easiest way...)
I have this code :
Dim myConnection As New OleDb.OleDbConnection
Dim myCommand As New OleDb.OleDbCommand
Dim myReader As OleDb.OleDbDataReader
Dim myConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Database.mdb"
myConnection = New OleDb.OleDbConnection(myConnectionString)
myConnection.Open()
Dim mySelect As String = "SELECT name, birthdate FROM MyTable"
myCommand = New Oledb.OleDbCommand(mySelect, myConnection)
myReader = myCommand.ExecuteReader()
End Sub
I want my datagrid to show the names and birthdates when I press on button1. How do I do that?
(as you have already guessed, Im a beginner so if you know the easiest way...)