Save Autopopulated value in the external Database

     I have mapped to an external sql server database. When I try to insert a record in the tables Expense and ExpenseReport, always the Id is sending as 0 and the only latest record is saved with Id as 0, other records are not auto-populated.  Inorder to save the Id as auto-populated number, I have set both the table IDENTITY as auto-populated in my external database, When I try to save data from outsystem I am getting the error as "Cannot insert explit value for identity column in table 'Expense' when IDENTITY_INSERT is set to OFF".   
If I set my tables as auto-populated I am facing above error , if it is not set as auto-populated only one data is saved with id as 0 in my external database
I am not sure how to save an auto populated id, is there any other way to send the auto-populated id from outsystems.


Let me try to help you.

In the external database if you have the Primary Key automatic, then you cannot send values in this field when inserting. Otherwise it will give you an error. If it's automatic, then 0 (which is Null value for integers) is always in the record that's being sent to the Insert action.

I couldn't understand what's the subject about not being populated...

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.