I have a database built with this statement:
CREATE TABLE starsystems
(
name TEXT NOT NULL COLLATE NOCASE,
systemaddress INT UNIQUE,
CONSTRAINT combined_uniques UNIQUE (name, systemaddress)
)
(and i can't change how the DB and the table is made)
One of the fields contains these data:
Name: "61 Cygni", systemaddress: 5856288576210
I'm using powershell to execute this query to fill a dataset:
$oSQLiteDBCommand.Commandtext='SELECT name, systemaddress FROM starsystems WHERE name IS "61 Cygni" '
But my result is:
61 Cygni, -2046815534
So, for some reason, the systemaddress field i get is like
(systemaddress & 0x00000000FFFFFFFF) | 0xFFFFFFFF00000000
(sorry for the horrible explanation, i lack the right english words, please pardon me).
What am i doing wrong and what should i do instead? And, since i need to change the systemaddress value, what should i do it to avoid this kind of unwanted conversion?