Forum Stats

  • 3,875,435 Users
  • 2,266,915 Discussions
  • 7,912,212 Comments

Discussions

C# multiple connexion oracle

user7897332
user7897332 Member Posts: 2
edited Jun 16, 2016 4:41AM in Oracle Help Technologies

Hello,

using Oracle.DataAccess.Client;
using System.Data.Odbc;

OracleConnection connexion = new OracleConnection("Data Source=(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = host)(PORT = 1521))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME =base))); User Id=id;Password=pwd;");
try
{connexion.Open();}
catch (Exception ex)
{MessageBox.Show(ex.Message);}
finally
{connexion.Close(); connexion.Dispose();}

OdbcConnection odbcconnexion = new OdbcConnection("Driver={Microsoft ODBC for Oracle};Server=base2:1521/ORCL;Uid=uid2;Pwd=pwd2;");
try
{odbcconnexion.Open();}
catch (Exception ex)
{MessageBox.Show(ex.Message);}
finally
{odbcconnexion.Close(); odbcconnexion.Dispose();}

give me this error :

ERROR [NA000] [Microsoft][ODBC driver for Oracle][Oracle]
ERROR [IM006] [Microsoft][Gestionnaire de pilotes ODBC] Échec SQLSetConnectAttr du pilote
ERROR [01000] [Microsoft][Gestionnaire de pilotes ODBC] Le pilote ne gère pas la version du comportement ODBC demandé par l'application (voir SQLSetEnvAttr).

Thanks for your help !

This discussion has been closed.