Skip to content

C# System.AccessViolationException Oracle.DataAccess.dll

Li Bel

Asked Jun 7, 2017, 5:13 AM EDT1 answer
Share
LinkedInX
Code
Here is my code (just a portion) :
Code
if (!conn.State.Equals(ConnectionState.Open))
Code
   conn.Open();
Code
cmd = new OracleCommand();
Code
cmd.Connection = conn;
Code
cmd.CommandText = sql;
Code
cmd.CommandType = CommandType.Text;
Code
dr = cmd.ExecuteReader();
Code
if (!dr.HasRows) return null;
Code
dt = new DataTable();
Code
dt.Load(dr);
Code
conn.Dispose();
Code
Code
I have 10 tables to extract from Oracle.
Code
I 've got this error only for two of them when try to load :
Code
Une exception non gérée du type 'System.AccessViolationException' s'est produite dans Oracle.DataAccess.dll


Informations supplémentaires : Tentative de lecture ou d'écriture de mémoire protégée. Cela indique souvent qu'une autre mémoire est endommagée.
Code
I have installed Oracle.DataAccess from Nuget gallery of Visual Studio 2015.
Code
Oracle.DataAccess.x86.4.4.112.3
Code
Anybody to help me ? Thanks in advance.

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Hi,
    I've solved my problem by my self. Instead of using the Oracle.DataAccess.X86, I've used the Oracle.Managed.DataAccess, and it's OK.  
    0