Not familiar with OCCI C++, but in general your environment has to be set up correctly. For your bash this is normally already the case but I see that you're initializing an environment object. Maybe you need to copy the settings from your bash environment to your object. E.g say your bash environment variables look something like this:
NLS_DATE_FORMAT='YYYY-MM-DD-HH24:MI:SS'; ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server; # etc ... Then you have to set your environment like this. env->oracleHome = '/usr/lib/oracle/xe/app/oracle/product/10.2.0/serv'; env->NLSDateFormat = 'YYYY-MM-DD-HH24:MI:SS'; // etc. ... Hope this helps On Mar 27, 10:46 pm, Shane <[email protected]> wrote: > This works great: > > $ sqlplus smiller/m...@oradev > > But connecting to the same db from the same box with this OCCI C++: > > std::string user("smiller"); > std::string pswd("mill"); > std::string db("oradev"); > Environment *env = Environment::createEnvironment(); > Connection *conn = env->createConnection(user,pswd,db); > > gives > > ORA-01017: invalid username/password; logon denied > > what stupid thing am I missing? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Oracle PL/SQL" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Oracle-PLSQL?hl=en -~----------~----~----~----~------~----~------~--~---
