但用ExecuteScalar就够了,而且效率更高
Dim myDate As string
Dim conn As SqlConnection = New SqlConnection("Server=(local);DataBase=test;Uid=sa;Pwd=123")
Dim sql As String = "SELECT adjustdate FROM plupos AS WHERE barcode = xxx "
Dim cmd As New SqlCommand(sql, conn)
conn.open
myDate=cmd.ExecuteScalar().tostring
conn.Close()