Wednesday, August 29, 2012

Cannot insert the value NULL into column

In one of my projects i have been working on is in its final development phases and QA deployment has begun.

One of the tables with column name last_changed_by gets automatically populated with the session user name on insert or update. The column default value is set to: create default set_to_userid as suser_name()

This works as expected in DEV environment (Windows Server 2008 and SQL Server 2008 R2) and the field is populated with the user performing the DML (insert or update).

In QA (Windows Server 2000 and SQL Server 2000) does not work on the same table and returns error below when Oracle Fusion tries DML:
‘Cannot insert the value NULL into column 'last_changed_by', table 'mysecurity.dbo.security_app_users'

QA environment access is very strict that dev team cannot run any kind of test cases, so helpless we decided to pass suser_sname ()

Its still unclear whats causing the default value not to kick in on DML statement execution. Any input is appreciated....




No comments:

Post a Comment