Click here to Skip to main content
14,662,206 members
Home » Discussions » C#
   

C#

 
GeneralRe: Unable to load file or assembly 'Oracle.DataAccess' Pin
Member 1483395811-Jun-20 3:00
MemberMember 1483395811-Jun-20 3:00 
GeneralRe: Unable to load file or assembly 'Oracle.DataAccess' Pin
Dave Kreskowiak11-Jun-20 3:21
mveDave Kreskowiak11-Jun-20 3:21 
GeneralRe: Unable to load file or assembly 'Oracle.DataAccess' Pin
Member 1483395811-Jun-20 3:47
MemberMember 1483395811-Jun-20 3:47 
GeneralRe: Unable to load file or assembly 'Oracle.DataAccess' Pin
Dave Kreskowiak11-Jun-20 3:50
mveDave Kreskowiak11-Jun-20 3:50 
GeneralRe: Unable to load file or assembly 'Oracle.DataAccess' Pin
Member 1483395811-Jun-20 6:31
MemberMember 1483395811-Jun-20 6:31 
GeneralRe: Unable to load file or assembly 'Oracle.DataAccess' Pin
Dave Kreskowiak11-Jun-20 7:55
mveDave Kreskowiak11-Jun-20 7:55 
GeneralRe: Unable to load file or assembly 'Oracle.DataAccess' Pin
Jörgen Andersson11-Jun-20 8:34
professionalJörgen Andersson11-Jun-20 8:34 
GeneralRe: Unable to load file or assembly 'Oracle.DataAccess' Pin
Member 1483395811-Jun-20 21:24
MemberMember 1483395811-Jun-20 21:24 
Bonjour,

J'ai téléchargé "ODAC112040Xcopy_32bit" et j'ai copié les .dll necessaires dans mon projet et j'ai ajouté le driver "Oracle.DataAccess.dll" dans la partie reference de mon projet. J'ai target platform avec 32 bit.
Après compilation et exécution, alors le driver a été bien chargé mais je ne peux pas connecter au base oracle sachant que de version 9i et lire le contenu d'une table.
J'ai le message suivant :

System.TypeInitializationException: Une exception a été levée par l'initialiseur de type pour 'Oracle.DataAccess.Client.OracleConnection'. ---> Oracle.DataAccess.Client.OracleException: The provider is not compatible with the version of Oracle client
   à Oracle.DataAccess.Client.OracleInit.Initialize()
   à Oracle.DataAccess.Client.OracleConnection..cctor()
   --- Fin de la trace de la pile d'exception interne ---
   à Oracle.DataAccess.Client.OracleConnection..ctor(String connectionString)
   à WebServiceToBD.Service1.view_data() dans d:\Developpement\SiteVs2012\WebServiceToBD\Service1.asmx.cs:ligne 48


Voici le code de méthode :
  public DataTable view_data()
        {
            OracleConnection conn = new OracleConnection("Data Source=(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = *.*.*.*)(PORT = 1521))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = ***)));User ID=***;Password=***");
            conn.Open();
            OracleDataAdapter dr = new OracleDataAdapter("select * from Personne", conn);
            DataSet ds = new DataSet();
            ds.Tables.Add("Personne");
            dr.Fill(ds,"Personne");
            DataTable tt = ds.Tables[0];
            return tt;
        }
<pre lang="c#">

La ligne 48 correspond au code suivant :

<pre lang="c#">OracleConnection conn = new OracleConnection("Data Source=(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = *.*.*.*)(PORT = 1521))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = ***)));User ID=***;Password=***");


Cette chaîne de connexion existe dans le programme et pas dans le fichier "Web.config".

modified 12-Jun-20 3:54am.

GeneralRe: Unable to load file or assembly 'Oracle.DataAccess' Pin
Jörgen Andersson11-Jun-20 22:31
professionalJörgen Andersson11-Jun-20 22:31 
GeneralRe: Unable to load file or assembly 'Oracle.DataAccess' Pin
Member 1483395812-Jun-20 3:11
MemberMember 1483395812-Jun-20 3:11 
GeneralRe: Unable to load file or assembly 'Oracle.DataAccess' Pin
Jörgen Andersson12-Jun-20 3:20
professionalJörgen Andersson12-Jun-20 3:20 
GeneralRe: Unable to load file or assembly 'Oracle.DataAccess' Pin
Member 1483395812-Jun-20 3:12
MemberMember 1483395812-Jun-20 3:12 
QuestionI Want to be able to give more than one output until mobhp = 0? How do i do that? Pin
Ultra9609-Jun-20 3:20
MemberUltra9609-Jun-20 3:20 
AnswerRe: I Want to be able to give more than one output until mobhp = 0? How do i do that? Pin
jsc429-Jun-20 3:40
professionaljsc429-Jun-20 3:40 
Question[C#] Diffirent between thread and timer Pin
namnv97-Jun-20 15:55
professionalnamnv97-Jun-20 15:55 
AnswerRe: [C#] Diffirent between thread and timer Pin
OriginalGriff7-Jun-20 20:23
mveOriginalGriff7-Jun-20 20:23 
AnswerRe: [C#] Diffirent between thread and timer Pin
Eddy Vluggen8-Jun-20 1:25
professionalEddy Vluggen8-Jun-20 1:25 
QuestionNeed help calling a static method Pin
Member 148563427-Jun-20 15:00
MemberMember 148563427-Jun-20 15:00 
AnswerRe: Need help calling a static method Pin
OriginalGriff7-Jun-20 20:29
mveOriginalGriff7-Jun-20 20:29 
QuestionCard shuffle program code help needed Pin
Brian_TheLion7-Jun-20 3:57
MemberBrian_TheLion7-Jun-20 3:57 
AnswerRe: Card shuffle program code help needed Pin
Dave Kreskowiak7-Jun-20 4:03
mveDave Kreskowiak7-Jun-20 4:03 
GeneralRe: Card shuffle program code help needed Pin
OriginalGriff7-Jun-20 4:14
mveOriginalGriff7-Jun-20 4:14 
GeneralRe: Card shuffle program code help needed Pin
Dave Kreskowiak7-Jun-20 8:05
mveDave Kreskowiak7-Jun-20 8:05 
GeneralRe: Card shuffle program code help needed Pin
Brian_TheLion8-Jun-20 19:17
MemberBrian_TheLion8-Jun-20 19:17 
GeneralRe: Card shuffle program code help needed (code included) Pin
Brian_TheLion7-Jun-20 15:27
MemberBrian_TheLion7-Jun-20 15:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.