Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. if (!System.IO.File.Exists("C:\Users\abc\Desktop\1\synccc.sqlite"))
  2. {
  3. Console.WriteLine("Just entered to create Sync DB");
  4. SQLiteConnection.CreateFile("C:\Users\abc\Desktop\1\synccc.sqlite");
  5. string sql = "create table highscores (name varchar(20), score int)";
  6. SQLiteCommand command = new SQLiteCommand(sql, sqlite2);
  7. command.ExecuteNonQuery();
  8. }
  9. sqlite2 = new SQLiteConnection("Data Source=C:\Users\abc\Desktop\1\synccc.sqlite");
  10.  
  11. if (!System.IO.File.Exists("C:\Users\abc\Desktop\1\synccc.sqlite"))
  12. {
  13. Console.WriteLine("Just entered to create Sync DB");
  14. SQLiteConnection.CreateFile("C:\Users\abc\Desktop\1\synccc.sqlite");
  15.  
  16. using(var sqlite2 = new SQLiteConnection("Data Source=C:\Users\abc\Desktop\1\synccc.sqlite"))
  17. {
  18. sqlite2.Open();
  19. string sql = "create table highscores (name varchar(20), score int)";
  20. SQLiteCommand command = new SQLiteCommand(sql, sqlite2);
  21. command.ExecuteNonQuery();
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement