Vote count:
0
It's me again, the guy working with SQLite-net. I had my code working when I did not have AutoIncrement on my Primary Keys of the tables. I wanted to AutoIncrement the keys so I reconstructed the Tables like this:
using SQLite;
namespace VehicleTracks.Models { public class vehicles { [PrimaryKey, AutoIncrement] public int ID { get; set; } public string VehID { get; set; } public string VehYear { get; set; } public string VehMake { get; set; } public string VehModel { get; set; } public string VehColor { get; set; } public string EngineID { get; set; } public System.DateTime PurchaseDate { get; set; } public string SellerName { get; set; } public string SellerStreet { get; set; } public string SellerCityStateZip { get; set; } public string VehOptions { get; set; } public string OdomInitial { get; set; } public string VehBodyStyle { get; set; } public float PurchaseCost { get; set; } public byte[] VehPhoto { get; set; } public string VehType { get; set; } public string Sold { get; set; } } }
Now when an attempt is made to create the Tables, I get "Syntax Error near AutoIncrement". I tried leaving off AutoIncrement and it does not appear to increment the ID without it.
I'm probably missing something stupid.
Aucun commentaire:
Enregistrer un commentaire