I want to connect Oracle Database in .net platform using C#
and here is some code
_connectionString = "Provider=MSDAORA.1;Data Source=yong;User ID=XXXX;Password=XXXX";
using (OdbcConnection sqlConnection = new OdbcConnection(_connectionString))
{
using (OdbcDataAdapter adapter = new OdbcDataAdapter())
{
try {
adapter.SelectCommand = new OdbcCommand(cmdText, sqlConnection);
adapter.SelectCommand.CommandType = commandType;
adapter.SelectCommand.CommandTimeout = _commandTimeOut;
adapter.SelectCommand.Connection.Open();
adapter.Fill(dtResult);
}
catch (Exception ex)
{
throw ex;
}
}
}
when I try this code, it throws error like
" msdaora.1' provider is not registered on the local machine "
I don't get what is a problem and how to fix this. How do I register a msdaora.1 provider on the local machine and what's wrong with my code?