I have a connection string that looks like this
con_str = \"myuser/mypass@oracle.sub.example.com:1521/ora1\"
Where ora1 is the
ora1
It still may not work. You need to take the output of dsnStr and modify the string by replacing SID with SERVICE_NAME and use that variable in the con string. This procedure worked for me.