Advertisement
Guest User

Untitled

a guest
Mar 21st, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. public void globalAccess()
  2. {
  3. DbSqliteConnection("MySql.Data.MySqlClient", GetConnectionStringByProvider("MySql.Data.MySqlClient"));
  4. global.Open();
  5.  
  6. DbCommand cmdGames = global.CreateCommand();
  7. cmdGames.CommandText = "select * from games";
  8. cmdGames.CommandType = CommandType.Text;
  9. gdgAdapter.SelectCommand = cmdGames;
  10. gdgAdapter.Fill(DsGameScores, "games");
  11.  
  12. DbCommand cmdScores = global.CreateCommand();
  13. cmdScores.CommandText = "select * from scores order by score desc";
  14. cmdScores.CommandType = CommandType.Text;
  15. gdsAdapter.SelectCommand = cmdScores;
  16. gdsAdapter.Fill(DsGameScores, "scores");
  17.  
  18. global.Close();
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement