Acu4GL for MSSQL error 9D,515



Error 9D,515 is encountered on a write to a new MSSQL table. The error logged in the Runtime trace is:

*** File system error value = 515 ***
*** Cannot insert the value NULL into column 'A4GLIdentity', table 'servername.dbo.tablename'; column does not allow nulls. INSERT fails.


The A4GLIdentity column is added to the table by the Acu4GL interface to provide better performance in cases where keys allow duplicate values. The addition of that column is controlled by the A_MSSQL_ADD_IDENTITY configuration variable. In this case the identity column was unexpected and the write resulted in an attempt to insert a null which is not allowed.The documentation for A_MSSQL_ADD_IDENTITY says this: 

"Note that the default value is True for a file that allows duplicates, and is False for a file with no duplicate keys."

However, the documentation is incorrect. The actual default is "True" FOR ALL FILES regardless of whether or not they allow duplicate keys. 

To avoid the error add "A_MSSQL_ADD_IDENTITY FALSE" in the Runtime configuration file.  Note that it must be set this way when the table is created.

Comment List