I want to add all the Records in my database in a list box (Book name), However nothing is adding to the listbox Code: cmd.Connection = cn cmd.CommandType = CommandType.Text cmd.CommandText = " select BookName from Book " rdr = cmd.ExecuteReader Do While rdr.Read cbdvuser.Items.Add(rdr.Item("BookName")) Loop cn.Close()
inside the while loop add a msgbox command to show you what it reads something like this i mean Code: .......... Dim reader As SqlDataReader reader = Command.ExecuteReader() While reader.Read() MsgBox(reader.Item(0)) End While reader.Close() .........