Int64 zero returns as one

I have a PostgreSQL database with a field that holds a file’s length (called FilePointer) , so I have it defined as datatype BIGINT. Most of the time this field has the value zero to indicate I have never read the file or want to read this file from the beginning. If the field is non-zero, it means I have read the file up until that character.

My problem is that sometimes when I retrieve the latest value of FilePointer it returns the zero value as one rather than zero, as if it is rounding it up or something.

Dim tempInt As Int64 tempInt = rs.Field("FilePointer").Int64Value 'FilePointer is zero in database, yet tempInt = 1

I use SQLDatabaseMBS but I am unsure whether this is the culprit. All my plugins are the latest releases. I compile on macOS, but have only noticed this behaviour when the application is running on Windows PCs. For PCs I compile in Xojo 2015 Release 2.4 since it’s the latest 32-bit version that runs back to XP.

My workaround is to define tempInt As Integer, rather than Int64, so it supports files up to 4 GB, and this works.

Is this likely an issue with the older Xojo 2015 compiler, PostgreSQL or SQLDatabaseMBS? I haven’t seen this issue anywhere else, but hate hidden surprises, and don’t want to find it is still an issue elsewhere.