c# - Xamarin.iOS SQLite db not inserting -


I am attempting to populate an SQL Light database on the iPhone. I am a parsed object that I re-invent my list. I am receiving

list

  public class clinics {{PrimaryKey, AutoIncrement} public integer id {}; Set; } [Indexed] Public string name {get; Set; } Public String Address1 {get; Set; } Public string address 2 {get; Set; } Public string Data1 {get; Set; } Public String Data 2 {Received; Set; } Public String Data3 {get; Set;} public string PostCode {get; Set; } Public string latitude {get; Set;} public string long {get; Set;}}  

Then I'm using folloiwing to insert in db

  public override zero ViewDidLoad () {base.ViewDidLoad (); TblResults.Source = New Search ResultTableSource (tableItems); TblResults.AutoresizingMask = UIViewAutoesizing.All; // Figure where the SQLite database will be. Var document = environment Gatefolder Path (Environmental specialfolder. Personal); _pathToDatabase = Path. Cobain (document, "discoveryfizio.db"); PopulateFromParseLocalDB (); } Public Zero populateFromParseLocalDB () {{list & lt; Clinic & gt; _clinics = new list & lt; Clinic & gt; (); Var query = ParseObject.GetQuery ("Clinic"). Orderbare ("made"). Boundary (10); . Query.FindAsync () ContinueWith (t = & gt; {IEnumerable & LT; ParseObject & gt; results = t.Result; foreach (obj at the results) {var अक्ष = obj.Get & lt; string & gt; (" Latitude "); Take on = obj .Get & LT; String> (" Long time "); ClinicName = obj.Get & lt; string & gt; (" name "); _cl.Name = clinicName; _cl .Lat = lat = _cl.Long = Lo; _clinics.Add (_cl); PopulateSqlLiteDb (ClinicName, Latitude, Long);}}); Var q = _clinics.Count; } Catch (Exception Pre) {}}  

Function to save SQL Light DB The way I am using ios Xamrain

  Public Zero PopulateSqlLiteDb (string name, lat string, string lng) {var clinic = new clinic {name = name, latitude = lat}. (Var db = New SQLite.SQLiteConnection (_pathToDatabase)) (db.Insert (clinic);}}  

But I do not save myself, I did not throw anyone as someone. There is an error.


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -