Goran Bibic

Goran Bibic

  • 482
  • 2.9k
  • 199.1k

Cloud database instead of local xamarin

Sep 8 2023 9:06 AM

I create app and all work fine
Need to replace string instead local database to be cloud database
Data in table database are same

New string is:

Data Source=94.251.1.1,1433;Initial Catalog="BCC";User ID=admin;Password=admin

My existing local database data

SQLiteConnection con;
public SQLiteConnection GetConnectionWithCreateDatabase()
{
    string fileName = "sampleDatabase.db3";
    string documentPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);
    string path = Path.Combine(documentPath, fileName);
    con = new SQLiteConnection(path);
    con.CreateTable<Employee>();
    return con;
}

Answers (1)