01.
Private
Sub
LoadScore()
02.
03.
Dim
sql
As
String
=
"SELECT names,score FROM HighScore"
04.
sql &=
" Where (level ='"
& Level &
"')"
05.
sql &=
" ORDER BY score DESC"
06.
Dim
cmd
As
New
OleDbCommand(sql, conn)
07.
Dim
da
As
New
OleDbDataAdapter(cmd)
08.
Dim
datascore
As
New
DataSet
09.
10.
da.Fill(datascore,
"HighScore"
)
11.
ScoreLoad(1) = data.Tables(
"HighScore"
).Rows(0)(
"score"
)
12.
ScoreLoad(2) = data.Tables(
"HighScore"
).Rows(1)(
"score"
)
13.
ScoreLoad(3) = data.Tables(
"HighScore"
).Rows(2)(
"score"
)
14.
ScoreLoad(4) = data.Tables(
"HighScore"
).Rows(3)(
"score"
)
15.
ScoreLoad(5) = data.Tables(
"HighScore"
).Rows(4)(
"score"
)
16.
17.
End
Sub