Forum Moderators: open

Message Too Old, No Replies

MSSQL error

I get an error when I try to add something

         

elifer

11:35 pm on Oct 20, 2004 (gmt 0)

10+ Year Member



Hello all,

Could someone help me with this error

Microsoft OLE DB Provider for SQL Server error '80040e2f'

Cannot insert the value NULL into column 'FILE_ID', table 'asrhem_portal.dbo.FILES'; column does not allow nulls. INSERT fails.

/tos/admin/inc_submit.asp, line 190

If I take a look at line 190 I get this code:

If (Not MM_abortEdit) Then
' execute the insert
Set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close

If (MM_editRedirectUrl <> "") Then
Response.Redirect(MM_editRedirectUrl)
End If
End If

I hope someone can help me out!

TheNige

12:20 am on Oct 21, 2004 (gmt 0)

10+ Year Member



The error says it all:

Cannot insert the value NULL into column 'FILE_ID', table 'asrhem_portal.dbo.FILES'; column does not allow nulls. INSERT fails.

The FILE_ID column is set in the database not to accept nulls. Check it out and change it if it needs to allow nulls. Or if it is an identification column then maybe you need to set it to "Identity", so it automatically adds a value.