I have a database in place with a client that seems to lose data overnight. They enter records and exit the system, and then claim to not be able to find them again the next day.
The ID numbers in the Primary Key Index of the affected tables do seem to have gaps in, when they should be auto-incremented and continuous. The client does not have the facility to delete records, so there seems to be an issue.
I have tried using DBCC CHECKDB
and DBCC REINDEX
but the records do not re-appear and the issue continues.
On exit from the VB.NET 2010 app, I use the following to write the record for each table:
Me.binds_Tablename1.EndEdit()
Me.binds_Tablename2.EndEdit()
TableAdapterManager.UpdateAll(Me.Dataset_1)
This system has worked fine for 2 years, but is now playing up. Could database corruption be the issue?
Using the SQL COALESCE function, it is easy to replace missing or NULL values in SELECT statements. Specific values can be set directly with COALESCE and the mean, median or mode can be used by combining COALESCE with WINDOW functions.
In SQL, due to lack of data, we sometimes need to insert rows with NULL values in the tables. Here, the keyword NULL(without quotes) is used to represent no data.
since this just started, is it possible that they are entering 2012 somewhere or it is related to the year 2012, maybe this value does not exist in a lookup table, the transaction gets rolled back
When a transaction rolls back the identity value is NOT reused, this is why you see gaps, you need to find out why you have rollbacks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With