Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

SQLite.Net - using negative PK

$
0
0

I'm using SQLite.NET (the component version) in my iOS app. My tables have int PK fields, but they are not autoincrementing. Data I download from the server is stored using the PK the server sends me, to maintain data integrity.

Data I create locally (and then need to sync back to the server) is stored using negative PK.

However, I'm seeing weird behavior when I try to determine the next PK to use. If I query "select PK from X order by PK" I do not get negative values. If I try to use "select min(PK) from x" I also get 0 instead of a negative.

If I try the same query using SQLite Manager (the FF plugin) I do get negative values back.

has anyone else ran into this? Any suggestions for a workaround or alternate approach?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>