The provider is not compatible with the version of Oracle client

Discussion in 'Site Programming, Development and Design' started by Tambovsky Wolf, Jan 17, 2012.

  1. Hi! I have an error related with version of oracle client. I have website that connects to the oracle server that situated at the college. On the local computer it works fine, it connects and all queries are work.But after uploading everything to the hosting it shows me error : The provider is not compatible with the version of Oracle client.
    To make it work on hosting I had to create bin directory and copied appropriate version of Oracle.DataAccess.dll into this folder. But still it shows me error with version: http://www.fareastaz.com/about.aspx
    This is my class file that supposed to connect to the database:
    Code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    
    using System.Web.Configuration;
    using Oracle.DataAccess.Client;
    
    
    public class clsContentConnected
    {
        private static readonly string _connectionString;
        static clsContentConnected()
        { _connectionString = WebConfigurationManager.ConnectionStrings["MyOracle"].ConnectionString; }
    
        //Displaying content from HOME PAGE
        public List<ppContent> GetContentForPage(int PageId)
        {
            List<ppContent> objPage = new List<ppContent>();
            OracleConnection conn = new OracleConnection(_connectionString);
            OracleCommand cmd = new OracleCommand("SELECT * FROM tbl_content WHERE id="+PageId.ToString(), conn);
            try
            {
                conn.Open();
                OracleDataReader dr = cmd.ExecuteReader();
                while (dr.Read())
                {
                    ppContent text = new ppContent();
                    text.ppContentText = dr["text"].ToString();
                    text.ppContentID = int.Parse(dr["id"].ToString());
                    objPage.Add(text);
                }
                return objPage;
            }
            catch (Exception ex)
            {
            objPage.Clear();
                return objPage;
            }
            finally
            {conn.Close();}
    
    
            }
    
    }
    
    Coould you please give me peace of advice what's wrong with my code ?
     

Share This Page