What is this int storage?

We have a Firebird database for the (very crappy) application and the front end of the application, but nothing in between (i.e. there is no source code).

There is a field in the database that is stored as -2086008209 , but is displayed as 63997 in the interface.

Examples:

  Database Front-End
  758038959 44093
 1532056691 61409
   28401112 65866
 -712038758 40712
  936488434 43872
 -688079579 48567
 1796491935 39437
 1178382500 30006
 1419373703 66069
 1996421588 48454
  890 825 339 46313
 -820234748 45206

What kind of storage is this? The goal for us here is to access the source data of the application and bypass the alltogether GUI, so I need to know how to decode this field to get the corresponding values ​​from it. It is stored as an int in FireBird (I don't know if FireBird / unsigned ints signed, but it appears as signed when we select it).


This is the field definition:

enter image description here

This, as far as I can tell, is not standardized. The GEN_CONTACTS_ID generator has GEN_CONTACTS_ID against it, which at first glance looks accurate.

+4
source share
3 answers

I am working with an application that stores raster images in integers (just do not ask), if you express them in this form, you are something useful or consistent

+1
source

I got the impression that the problem is in the front. If what is stored in the database is -2086008209 , then what is stored in the database is -2086008209 . To better understand how the application manipulates data, try saving other numbers to the database and see how they are displayed.

+1
source

Have you come to this realization through SQL registration? If you don’t have one, you can recommend yourself by using the Firebird Trace API to get this SQL: http://www.firebirdfaq.org/faq95/ . A simple tool for analyzing the Trace API is this commercial product: http://www.upscene.com/products.fbtm.index.php .

I used these tools and other methods (triggers, etc.) to find the application to use / modify in the database.

Of course, if the SQL statement selects * from the table, then these tools will not help.

0
source

Source: https://habr.com/ru/post/1500241/


All Articles