Guest User

Untitled

a guest
Jul 17th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. AConnection conn = new SAConnection("Data Source=SQL Anywhere 12 Demo");
  2. conn.Open();
  3. SACommand cmd = new SACommand("SELECT Surname FROM Employees", conn);
  4. SADataReader reader = cmd.ExecuteReader();
  5. listEmployees.BeginUpdate();
  6. while (reader.Read())
  7. {
  8. listEmployees.Items.Add(reader.GetString(0));
  9. }
  10. listEmployees.EndUpdate();
  11. reader.Close();
  12. conn.Close();
Add Comment
Please, Sign In to add comment