I am trying to use MongoDB ODBC driver to update an asset into the database. Currently, I am using Power Automate and here is my code that is not working (select statment is working fine):
Connect String:
Provider=MSDASQL;Persist Security Info=False;Extended Properties="DSN=TEST2;SERVER=20.126.XX.XXX;UID={powerautomateuser?source=XXXXX-ro-db};DATABASE={XXXXX-ro-db};PORT=33XX;LOG_QUERY=1;"
Execute SQL:
UPDATE powerAutomatePosts
SET facebookPostld = '195982166685423'
WHERE _id = '646d9c2a9ad6287f1ccfa760';
Error:
vCorrelation Id: 67dd3281-804a-4df2-9c26-f503340be92f
ERROR [42000] [MySQL][ODBC 1.4(w) Driver][mysqld-5.7.12 mongosqld v2.14.5]parse sql 'UPDATE powerAutomatePosts SET facebookPostld = '195982166685423' WHERE _id = '646d9c2a9ad6287f1ccfa760';' error: unexpected UPDATE at position 8 near UPDATE
To update the asset into the MongoDB
Looking for that error, found that maybe is the character encoding, as saying this link
Try changing the unicode driver you're using on the ODBC configuration. Hope this can help you