55
Views
6
Comments
UPDATE on an External Database Connection
Question
I have a External Database connection setup pointing to a couple tables on a DB2 i Series.  I can queries these tables just fine with either an Aggregate object or SQL object.  But I actually need to update some of the records on those external tables.  When I try and run the following SQL statement, it reurns 'No Rows Returned' but no change is affected.  Is this a limitation of the OutSystems External DB Connection feature??

UPDATE {TABLE}
SET {TABLE}.[COLUMN] = 'myValue'
WHERE {TABLE}.[ID] = 30

I can run the same statement on IBM Data Studio using the same credentials used by OutSystems, so I'm sure it's not a matter of role restriction.
2014-10-29 17-38-35
Kayala Sunil
Marco - It seems to me that the table /  table column which you are referring might be having the conflict. So kindly check that before executing it [or] the values you are passing inside the table or column or id is not matching... 

2015-06-09 21-08-23
Marco Asteriti
Kayala, 

not sure what kind of conflict you mean.  I didn't get any errors and I'm the only one accessing that record.  Should I be able to execute the Update on an external db??  If so, then maybe I need to contact Support??
2014-10-29 17-38-35
Kayala Sunil
Marco - I think you can update an external DB
UserImage.jpg
mohammad alghouleh
Hi Marco,

could you check the auto commit in the data base connection in service center.
it should be true.
also check if you have the authorities on you physical file *PUBLIC.
Thanks
2019-11-12 17-31-26
Justin James
 
MVP
Marco -

That should work fine.

Something I *have* noticed is that queries like this run inside Service Studio won't actually commit, they need to be run inside of the running application. :(

J.Ja
2015-06-09 21-08-23
Marco Asteriti
Yep, that was the issue.  It wasn't committing and accepting a 'commit' command either;  but it works in the application. Thanks!
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.