MySqlConnection conn = new MySqlConnection("SERVER=localhost; DATABASE=employees;UID=root;PASSWORD=");
conn.Open();
DataSet ds = new DataSet("employees");
MySqlDataAdapter sda = new MySqlDataAdapter("select * from salaries", conn);
sda.Fill(ds, "salaries");
var result =
from s in ds.Tables["salaries"].AsEnumerable().Take(10)
select s;
Listing. 1
Warning! Don't use the example in real application! Please leave a comment why it's bad designed.
No comments:
Post a Comment