How to connect to other Oracle Client
Posted: Mon 05 Oct 2020 12:09
Hello!
I have an old project which used an Oracle Client 10.2.0.5 (x64)
Oracle Client files can be downloaded from https://www.oracle.com/ru/database/tech ... loads.html. (get instantclient-basic-win64-10.2.0.5.zip)
After changing Home property of Oracle Connection I have the error "Cannot find Oracle Home.".
How to solve this problem?
To reproduce this situation you should have:
1) MS VS 2019
2) compile C# (.NetFramework) as x64 project
3) Devart dotConnect for Oracle 9.13.1107 (trial)
3) c# code
I have an old project which used an Oracle Client 10.2.0.5 (x64)
Oracle Client files can be downloaded from https://www.oracle.com/ru/database/tech ... loads.html. (get instantclient-basic-win64-10.2.0.5.zip)
After changing Home property of Oracle Connection I have the error "Cannot find Oracle Home.".
How to solve this problem?
To reproduce this situation you should have:
1) MS VS 2019
2) compile C# (.NetFramework) as x64 project
3) Devart dotConnect for Oracle 9.13.1107 (trial)
3) c# code
Code: Select all
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Devart.Data.Linq;
using Devart.Data.Linq.Mapping;
using Devart.Data.Oracle;
using System.Diagnostics;
namespace Alco2
{
class Program
{
static void Main(string[] args)
{
var Login = "x";
var Password = "x";
var Server = "x";
var home = @"c:\Users\..."; //full path to Oracle Client 10.2.0.5 downloaded from https://www.oracle.com/ru/database/technologies/instant-client/winx64-64-downloads.html. (get instantclient-basic-win64-10.2.0.5.zip)
try
{
var conn = new OracleConnection()
{
UserId = Login,
Server = Server,
Password = Password,
Direct = false,
Home = home
};
conn.Open();
conn.Close();
}
catch (Exception ex)
{
}
}
}
}