Results 1 to 2 of 2
Thread: Database Table is stuffed
Feb 19, 2003, 19:10 #1
- Join Date
- Sep 2000
- 0 Post(s)
- 0 Thread(s)
Urgent - Database Table is stuffed
Something has I assume corrupted one of my database tables.
The database is on a remote SQL Server and I have been accessing it with Microsoft Access when I need to make changes (changes are also made through my website with ASP.NET).
It is no longer accessible with script, and when I try to open it with Microsoft Access it gives me this error message:
ADO Error: Unable to insert the value NULL into column ",table"; column does not allow nulls. Insert Fails. The statement has been terminated
This has happened to two seperate database tables now.
What's worse is that it gives me a "Fatal Error" message when I try to delete the table.
I can easily recreate the table, but as I am unable to remove or try to fix the last one it seems I would have to give the table a different name and change the 10-15 pages that reference that table name.
But given it has already happened to two tables, I would prefer to learn what is going wrong and how to fix the database rather than continually moving tables around.
I need a solution to this rather quickly as the site is live and people are unable to access the page to create draftlists at the moment.
Last edited by mtffafl; Feb 19, 2003 at 19:26.MTFFAFL WebFooty - Are You On The Ball?
Fantasy Australian Football
Feb 22, 2003, 06:26 #2
For a quick-and-dirty solution make all columns nullable.
Possible solution: Check that all identity columns still have the identity attribute set. When transfering tables, SQL Server will sometimes remove the identity attribute from a table. If your code is not setting that value, then Null errors will start popping up.