How can pull selected fields of a record from an access database and put it into a label? This is what I have so far:
Using conn As New OleDbConnection(Get_Constring)
conn.Open()
Using cmd As OleDbCommand = conn.CreateCommand
If cb_Stat.Text = "Top Scorer" Then
cmd.CommandText = "SELECT MAX(Goals) FROM PlayerDatabase"
Label1.Text = cmd.ExecuteScalar
End If
End Using
conn.Close()
End Using
What happens is the max number of goals scored by a player from the playerdatabase is put into the string which is 10. How can I get it to also pull out the data from the Forename and Surname fields of the same record and display it as "John Doe 10" instead of just "10"