Code:
private void Button_Click_6(object sender, RoutedEventArgs e)
{
TimerView tobj = new TimerView();
tobj.Show();
string OracleServer = "Data Source=(DESCRIPTION="
+ "(ADDRESS=(PROTOCOL=TCP)(HOST=DLDT-0897.nectechnologies.in)(PORT=1521))"
+ "(CONNECT_DATA=(SERVICE_NAME=XE)));"
+ "User ID=system;Password=abc@1234;";
public bool Open()
{
try
{
conn = new OracleConnection(OracleServer);
conn.Open();
return true;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
return false;
}
Error in conn.Open()
:
Warning 1 There was a mismatch between the processor architecture of the project being built "MSIL" 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. WpfApplication
Open
method within the click handler. – Stefan