01.
Dim
str
As
String
02.
Dim
da
As
OleDbDataAdapter
03.
Dim
ds
As
New
DataSet
04.
05.
str =
String
.Format(
"SELECT item_id,item_name,item_picpath FROM tb_item ORDER BY item_id "
)
06.
07.
Try
08.
If
isfind =
True
Then
09.
ds.Tables(
"item"
).Clear()
10.
End
If
11.
Catch
12.
End
Try
13.
14.
15.
da =
New
OleDbDataAdapter(str, con)
16.
da.Fill(ds,
"item"
)
17.
If
ds.Tables(
"item"
).Rows.Count >= 0
Then
18.
isfind =
True
19.
20.
21.
With
DataGridView1
22.
.
ReadOnly
=
True
23.
.DataSource = ds.Tables(
"item"
)
24.
End
With