01.
Public
Function
searchTool(
ByVal
txtPm
As
String
)
As
DataTable
02.
Dim
objCommand
As
SqlCommand
03.
Dim
resultDt
As
DataTable =
New
DataTable
04.
Dim
objReader
As
SqlDataReader
05.
Dim
strSql
As
String
06.
07.
strSql =
"select itemnum,description from tbl_inventory where"
08.
strSql &=
"itemnum = '"
& txtPm &
"'"
09.
10.
objCommand =
New
SqlCommand(strSql, objConn)
11.
objReader = objCommand.ExecuteReader()
12.
resultDt.Load(objReader)
13.
14.
Return
resultDt
15.
End
Function