Insert error   

Insert error   

  
Hello Everybody,
I just trying to do a simple insert.  Please see the attached document.  I get a "Key cannot be null" error  in Outsystems.  Don't know why.  I created an output structure that has 6 of the 7 fields of the AuditResults table.....leaving out the primary key of course, because the primary key increments automatically.  I attached a screen shot of the error and my insert statement.  I also attached a screen shot of a query I did of the AuditResults table in SQL Server Management Studio.  You'll see that the record successfully inserted into AuditResults table in SQL Server Management Studio.       w     gffff
silly question perhaps, but why the "complex" insert, instead of using the create<entity> action?

on the sql statement, i suggest to make it more like

INSERT INTO table_name (column1, column2, column3,...)
VALUES (value1, value2, value3,...)
Hi Frank,

That error is because of the "Commit" in the advanced query. You are not allowed to do that.
If you want to force a commit, use the CommitTransaction action.

Also as Joost sugested you should use the Create<entity> action instead, since it looks like a simple insert.

Regards,
João Rosado
Joao, the CommitTransaction action  worked beautifully!!!  It took me a while to find this action, but I found it.  Once I get to know outsystems, this is going to be a great system to work with.  Joost, I only provide simple examples of my problems, because I want to get assistance with the most essential issue of my problem.  My insert statement is going to get complicated, but if I cannot do a simple insert statement....I am dead in the water.  Thanks for your help everyone!!!  Frank