1
Views
4
Comments
Need to delete a record from an external Oracle table with composite key
Question
I've referenced via Integration Studio an Oracle table with a composite primary key. I could not specify the composite key within the integration studio since no composite keys are allowed in outsystems. My referenced table therefore has no specified identifier in service studio. The only action that I'm allowed on the table is Create. Actions such as Delete or Update are not available. How do I handle this?
2012-03-16 12-21-09
João Rosado
Staff
Hi George,

You will need to create an action in your espace that recieves as inputs your key and the inside place an advanced query that does the delete.
Then you can just reuse that action like it was a builtin delete action.

Regards,
João Rosado
UserImage.jpg
George Mikeos
Hi Joao, thanks for your reply. I have already tried this but the advanced query (delete) returns no records found. If I change it to select then it returns the record fine. I thought that this is because of the lack of primary key. Any ideas?
2012-03-16 12-21-09
João Rosado
Staff
Well, the advanced query will never return anything on an update or delete operation.
But does the data get changed in the database? Or it says there?

Not having a primary key defined in the model doesn't do anything on advanced queries, the sql written there is the sql that will be run at the database (except the {tablename} replacements).

Regards,
João Rosado
UserImage.jpg
George Mikeos
Hi Joao, 

I' ve figured it out.
The advanced query was working fine. Only in test mode the changes in the DB were not being committed.

When I called the advanced query from the screen everything worked fine.

Regards,

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