I am trying to connect database created in Oracle 11g. This is simple code I wanted to use to check connection in VS, but It doesn't even works:
OleDbConnection conn = new OleDbConnection("Provider=MSDAORA; Data Source = localhost; User ID = library; Password = library; Unicode = True");
private void button1_Click(object sender, EventArgs e)
{
conn.Open();
}
I get this error when I click button:
An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in System.Data.dll
Additional information: Error while trying to retrieve text for error ORA-01019
When I go to server explorer --> add connection and type in my database information, it works fine and connection shows up in server explorer.
I also get a warning in VS:
Severity Code Description Project File Line Suppression State Warning There was a mismatch between the processor architecture of the project being built "x86" and the processor architecture of the reference "Oracle.DataAccess, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=AMD64", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. Biblioteka1
ORA-01019
in SO with c# or .net. – IgorProvider=OraOLEDB.Oracle;Data Source=localhost;User Id=library; Password=library;
– CodeNotFound