How to check DigaSystem database for consistency (MS SQL)
Given your DSN is named "DigaSystem5" and the DigaSystem table you want to check is named "Table5" (adapt the example to your real DSN and table name).
Open the SQL Management Studio and run the following queries:
SELECT * FROM [DigaSystem5].[david].[DIGAS] WHERE TABLENAME LIKE 'Table5%'
GO
SELECT TOP 1 RefNr FROM [DigaSystem5].[david].[Table5] ORDER BY RefNR Desc
GO
SELECT TOP 1 RefNr FROM [DigaSystem5].[david].[Table5_M] ORDER BY RefNR Desc
GO
Check that the maximum RefNr used in the tables equal the LASTPRIMARYKEY field in the DIGAS table