Setting the role using Oracle.DataAccess.Client.

I have a user role and password attaching to oracle 10 that I need to set. Could not find where to set it.

Hi,
You'd set it the same way you do for a sqlplus session, for example. Use the SET ROLE command, which you can execute via an OracleCommand object and ExecuteNonQuery().
Hope it helps,
Greg

Similar Messages

  • C# program wont work on other machines using Oracle.DataAccess.Client

    The program works fine on the PC that i am developing on i have installed the Visual studio tools from http://www.oracle.com/technology/software/tech/dotnet/utilsoft.html.
    at the start of my code i am using the code "using Oracle.DataAccess.Client; // ODP.NET Oracle managed provider" and i have added the oracle data provider in the reference list.
    When my program is complied it includes Oracle.DataAccess.dll in the older with the exe
    but on any pc i run it on other than mine i get the error shown below (i cant read the error as my friends pc has vista on and crashes the program when he clicked details)
    !http://i41.tinypic.com/710b9w.jpg!
    Edited by: user3473837 on Mar 21, 2009 11:43 AM

    Hi,
    That error occurs when you dont have the right version of Oracle client software installed to use the version of ODP the app loaded.
    What version of ODP was the app compiled with, what version of ODP does the computer you moved the app to have, what version of Oracle client does that computer have, and did you deploy oracle.dataacess along with your app (you shouldnt, unless you're deploying all the files it needs too -- ie, the instant client install).
    Does the computer you moved the app to already have Oracle client? It needs to.
    This might help:
    11g ODP.NET 32bit/64bit minimum requirements to install to a client machine
    Hope it helps,
    Greg
    Edited by: gdarling on Mar 21, 2009 12:56 PM
    Also, for future reference, the ODP forum is [over here|http://forums.oracle.com/forums/forum.jspa?forumID=146&start=0].

  • ORA-12154 using Oracle.DataAccess.Client

    I am experiencing an ORA-12154 exception when accessing a remote Oracle database using ADO.NET called from c# code running on a Windows 2003 system. The code functions correctly on our internal (remote) database using the Oracle XE 10.2 Client. At the customer site with Oracle 10.1 Client the same code generates the 12154 error.
    At the customer site, I can connect without errors with the customer's connection information (Hostname, port, SID) using Navicat 8 Lite for Oracle and SQL-Plus. I can also connect with no problems using ODBC (except I can't use ODBC because it causes other problems when accessed from ASP.NET).
    The connection string is correctly formulated i.e. "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=myServerName)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=myServiceName)));User Id=myUserName;Password=myPassword"
    When I run TNSPING on the client's system I get the following result (server and SID name altered for confidentiality reasons):
    Adapter TNSNAMES zur Auflösung des Alias benutzt
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = myServerName)(PORT = 1521)) (CONNECT_DATA = (SERVER = dedicated) (SERVICE_NAME = myServiceName)))
    OK (10 ms)
    I can't determine anything about the listener since I don't have access to teh datbase server.
    To summarize, my .net code fails when I use the Oracle Data Access Client, but works fine with ODBC, and Navicat, SQL Plus also work fine.
    Can anyone suggest the cause and possible solution for this problem? - thanks in advance for any help :)

    user8609285 wrote:
    I am experiencing an ORA-12154 exception when accessing a remote Oracle database using ADO.NET called from c# code running on a Windows 2003 system. The code functions correctly on our internal (remote) database using the Oracle XE 10.2 Client. At the customer site with Oracle 10.1 Client the same code generates the 12154 error.
    At the customer site, I can connect without errors with the customer's connection information (Hostname, port, SID) using Navicat 8 Lite for Oracle and SQL-Plus. I can also connect with no problems using ODBC (except I can't use ODBC because it causes other problems when accessed from ASP.NET).
    The connection string is correctly formulated i.e. "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=myServerName)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=myServiceName)));User Id=myUserName;Password=myPassword"
    When I run TNSPING on the client's system I get the following result (server and SID name altered for confidentiality reasons):
    Adapter TNSNAMES zur Auflösung des Alias benutzt
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = myServerName)(PORT = 1521)) (CONNECT_DATA = (SERVER = dedicated) (SERVICE_NAME = myServiceName)))
    OK (10 ms)
    I can't determine anything about the listener since I don't have access to teh datbase server.
    To summarize, my .net code fails when I use the Oracle Data Access Client, but works fine with ODBC, and Navicat, SQL Plus also work fine.
    Can anyone suggest the cause and possible solution for this problem? - thanks in advance for any help :)ora-12154 means one thing and one thing only.
    [oracle@vmlnx01 ~]$ oerr ora 12154
    12154, 00000, "TNS:could not resolve the connect identifier specified"
    // *Cause:  A connection to a database or other service was requested using
    // a connect identifier, and the connect identifier specified could not
    // be resolved into a connect descriptor using one of the naming methods
    // configured. For example, if the type of connect identifier used was a
    // net service name then the net service name could not be found in a
    // naming method repository, or the repository could not be
    // located or reached.
    // *Action:
    //   - If you are using local naming (TNSNAMES.ORA file):
    //      - Make sure that "TNSNAMES" is listed as one of the values of the
    //        NAMES.DIRECTORY_PATH parameter in the Oracle Net profile
    //        (SQLNET.ORA)
    //      - Verify that a TNSNAMES.ORA file exists and is in the proper
    //        directory and is accessible.
    //      - Check that the net service name used as the connect identifier
    //        exists in the TNSNAMES.ORA file.
    //      - Make sure there are no syntax errors anywhere in the TNSNAMES.ORA
    //        file.  Look for unmatched parentheses or stray characters. Errors
    //        in a TNSNAMES.ORA file may make it unusable.
    //   - If you are using directory naming:
    //      - Verify that "LDAP" is listed as one of the values of the
    //        NAMES.DIRETORY_PATH parameter in the Oracle Net profile
    //        (SQLNET.ORA).
    //      - Verify that the LDAP directory server is up and that it is
    //        accessible.
    //      - Verify that the net service name or database name used as the
    //        connect identifier is configured in the directory.
    //      - Verify that the default context being used is correct by
    //        specifying a fully qualified net service name or a full LDAP DN
    //        as the connect identifier
    //   - If you are using easy connect naming:
    //      - Verify that "EZCONNECT" is listed as one of the values of the
    //        NAMES.DIRETORY_PATH parameter in the Oracle Net profile
    //        (SQLNET.ORA).
    //      - Make sure the host, port and service name specified
    //        are correct.
    //      - Try enclosing the connect identifier in quote marks.
    //   See the Oracle Net Services Administrators Guide or the Oracle
    //   operating system specific guide for more information on naming.Bottom line is the net service name you presented is not found in the tnsnames that was being used. Which may not be the tnsnames you think was being used.
    And since it never resolved that on the client side, there is no need to look to anything (like the listener) on the host side. You never got out of your driveway, so there is no need to see if the entrance to your destination is open.

  • Migrating System.Data.OracleClient to Oracle.DataAccess.Client - XSD error

    Hi, I'm a newbie using Oracle ODP.NET provider for .NET.
    We have a web application that uses XSD to connect to Oracle using the provider System.Data.OracleClient.
    We want to migrate from System.Data.OracleClient to Oracle.DataAccess.Client.
    Installing and referencing the Oracle.DataAccess.dll all works fine.
    Then I changed all the references from System.Data.OracleClient to Oracle.DataAccess.Client and removed the System.Data.OracleClient.dll assembly from the web.config file.
    All compiles well, until I run the application, looks like the problem is the parameter use in the XSD file... the error I get is:
    Server Error in '/src' Application.
    Value does not fall within the expected range.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Exception Details: System.ArgumentException: Value does not fall within the expected range.
    Source Error:
    Line 8864: global::Oracle.DataAccess.Client.OracleParameter param = new global::Oracle.DataAccess.Client.OracleParameter();
    Line 8865: param.ParameterName = "Original_TIPOCOMISIONID";
    Line 8866: param.DbType = global::System.Data.DbType.VarNumeric;
    Line 8867: param.IsNullable = true;
    Line 8868: param.SourceColumn = "TIPOCOMISIONID";
    Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\src\4a9afcc3\460b5b6b\App_Code.eljteq62.7.cs Line: 8866
    Stack Trace:
    [ArgumentException: Value does not fall within the expected range.]
    Oracle.DataAccess.Client.OracleParameter.set_DbType(DbType value) +134
    dsProductosTableAdapters.SIPC_TIPOCOMISIONTableAdapter.InitAdapter() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\src\4a9afcc3\460b5b6b\App_Code.eljteq62.7.cs:8866
    dsProductosTableAdapters.SIPC_TIPOCOMISIONTableAdapter.get_Adapter() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\src\4a9afcc3\460b5b6b\App_Code.eljteq62.7.cs:8797
    dsProductosTableAdapters.SIPC_TIPOCOMISIONTableAdapter.GetData() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\src\4a9afcc3\460b5b6b\App_Code.eljteq62.7.cs:8993
    [TargetInvocationException: Exception has been thrown by the target of an invocation.]
    System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0
    System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +71
    System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +350
    System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29
    System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance) +488
    System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1247
    System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e) +95
    System.Web.UI.WebControls.ListControl.PerformSelect() +34
    System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
    System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
    System.Web.UI.WebControls.BaseDataBoundControl.OnPreRender(EventArgs e) +22
    System.Web.UI.WebControls.ListControl.OnPreRender(EventArgs e) +18
    System.Web.UI.Control.PreRenderRecursiveInternal() +80
    System.Web.UI.Control.PreRenderRecursiveInternal() +171
    System.Web.UI.Control.PreRenderRecursiveInternal() +171
    System.Web.UI.Control.PreRenderRecursiveInternal() +171
    System.Web.UI.Control.PreRenderRecursiveInternal() +171
    System.Web.UI.Control.PreRenderRecursiveInternal() +171
    System.Web.UI.Control.PreRenderRecursiveInternal() +171
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
    Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3614
    I'd like some help on how to make the XSD compile with the new provider, Oracle.DataAccess.Client.
    Many thanks in advance for any help!
    Pieter

    MS OracleClient binds parameters by name. ODP.NET binds by position. If you want to change ODP.NET's default parameter binding behavior, set:
    OracleCommand.BindByName = true;
    Do this for every OracleCommand that binds parameters.

  • Oracle.DataAccess.Client.OracleException

    Hi,
    I am trying to cennect to our oracle database 8i using ODP.Net.
    When I run my code I get the following Exception:
    Oracle.DataAccess.Client.OracleException ?alc\7.0.3300.0__b03f5f7f11d50a3a\microsoft.visualc.dll at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, IntPtr opsSqlCtx, Object src, String procedure, String[] args) at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src, String[] args) at Oracle.DataAccess.Client.OracleConnection.Open() at WebApplication88.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\webapplication88\webform1.aspx.cs:line 30
    I get said exception when I try to open the connection.
    Here is my code:
    try
    OracleConnection conn;
    conn = new OracleConnection();
    conn.ConnectionString = "User Id=xxx;Password=yyy;Data Source=zzz";
    conn.Open();
    conn.Close();
    catch(Exception ex)
    Response.Write(ex.ToString());
    All help greatly Appreciated,
    yevy

    Exact same thing happens for me, but no one here seems to want to help!
    I'm wondering if their ODP.NET stuff even works at all!

  • Oracle.DataAccess.Client.OracleException ORA-06502: PL/SQL

    I have the following Simple PL/SQL function:
    FUNCTION INSERTFBEXP (
    p_expid INTEGER,
    p_run_identifier     VARCHAR2,
    p_run_complete     INTEGER,
    p_run_completion_status VARCHAR2,
    p_complete_errors INTEGER
    RETURN INTEGER
    IS
    newid INTEGER;
    concheck INTEGER;
    BEGIN
    concheck := 1;
    newid := 1;
    INSERT INTO test.exp
    (ID, concheck, expid, run_identifier,run_complete, run_completion_status, complete_errors
    VALUES (test.id_testexp.NEXTVAL, concheck, p_expid, p_run_identifier, p_run_complete, p_run_completion_status, p_complete_errors
    ) RETURNING ID INTO newid;
    RETURN newid;
    END;
    Which I am calling from the following .Net procedure:
    Public Function insertTestExp(ByVal expid As Int32, ByVal Run_Identifier As String, _
    ByVal Run_Complete As Boolean, ByVal CompletionStatus As String, ByVal Complete_Errors As Boolean) As Integer
    Dim id As Integer
    With m_OraCmd
    .CommandText = "USER.FBPROCESS.INSERTFBEXP"
    .CommandType = CommandType.StoredProcedure
    With .Parameters
    .Clear()
    .Add(New OracleParameter("p_expid", OracleDbType.Int32)).Value = expid
    .Add(New OracleParameter("p_run_identifier", OracleDbType.Varchar2, 50)).Value = Run_Identifier
    .Add(New OracleParameter("p_run_complete", OracleDbType.Int32)).Value = Convert.ToInt32(Run_Complete)
    .Add(New OracleParameter("p_run_completion_status", OracleDbType.Varchar2, 50)).Value = CompletionStatus
    .Add(New OracleParameter("p_complete_errors", OracleDbType.Int32)).Value = Convert.ToInt32(Complete_Errors)
    .Add(New OracleParameter("newid", OracleDbType.Int32)).Direction = ParameterDirection.ReturnValue
    End With
    Try
    .ExecuteNonQuery()
    Catch ex As Exception
    MsgBox(ex.ToString)
    End Try
    Return CType(.Parameters(5).Value, Int32)
    End With
    End Function
    When I attempt to run the .Net function I get the following error:
    Oracle.DataAccess.Client.OracleException ORA-06502: PL/SQL
    I have determined by trial and error that the problem is in passing the VARCHAR2 parameters. I do not have this problem with the Microsoft Oracle Provider. Can someone help me with what I'm missing? Thanks.

    Note that I have not tested your code... but, it looks like you are using bind by position (which is the default). In this mode the return value needs to be bound first since ODP.NET will generate code similar to this:
    :ret_val := proc(:1, :2,...);That's where I would start anyway.
    Hope that helps a bit,
    Mark

  • Oracle.DataAccess.Client not found[SOLVED]

    Hello,
    I am trying to run a stored procedure using C# and I need to use the Oracle.DataAccess.Client but when i enter
    "using Oracle.DataAccess.Client;" visual studio throws the error:
    Error 1 The type or namespace name 'Oracle' could not be found (are you missing a using directive or an assembly reference?) P:\data\ActionItemLog\ActionItemLog\updateComment.aspx.cs 14 7 ActionItemLog
    And I installed the newest ODTwithODP for .NET. I would really like some help on this subject and I will do my best to clarify even more if needed.
    Thanks in advance,
    Dylan
    Message was edited by:
    dkroy

    Just a stupid mistake on my part all I had to do is in visual studio add the Oracle.DataAccess.dll file to references. I hope this mistake saves some one a bit of time in the future.

  • Oracle.DataAccess.Client

    I am having problem using "Imports Oracle.DataAccess.Client" on my code.
    When I put Imports Oracle.DataAccess.Client at the begining of the page, it will underline it and show sign of error.
    When I use OracleCommand, OracleConnection, OracleDataReader on my code page, it will show underline color under them (this means something visual studio does not recognize them). I thought I already installed ODP.NEt from Oracle site. It works well with Strongly typed dataset and tableadapter for accessing oracle database through the visual studio interface and wizard.
    Can anyone know what is going on with my ODP.net and Visual studio ? Please help.
    thank you in advance.

    Hi,
    Since you are using the keyword imports, I will assume you have a VB.NET project. Simply pull down the Projects menu and choose Add Reference. Scroll to the .NET assembly Oracle.DataAccess.Client and add it to the project.
    HTH
    Jenny B.

  • How much faster is Oracle.DataAccess.Client over System.Data.OracleClient ?

    Ok, I can use two differenct data providers in VisualCSharp/.NET:
    1.) MS built-in data provider:
    using System.Data.OracleClient ;
    2.) Oracle ODP.NET data provider:
    using Oracle.DataAccess.Client ;
    How much faster is Oracle over the built-in access provider ?
    Does Oracles ODP use MS basic ADO.NET as underlying layer
    or does it bypass it ?
    What are the other advantages when I use Oracle ODP?
    Is there a side-by-side comparison chart between the two access methods ?

    I would say that it is both for speed and for functionality. The ODP data provider has Oracle specific functionality that is not available via the MS data provider.
    From the ODP.NET page:
    ODP.NET includes many features not available from other .NET drivers, including a native XML data type, the ability to bind array parameters, RAC tuning, and statement caching.

  • Oracle.DataAccess.Client如何处理xmltype字段

    c# vs2012 windows7 oracle11g服务端客户端字符集【SIMPLIFIED CHINESE_CHINA.US7ASCII】
    原本是想解决 XMLTYPE字段里面中文乱码的问题的,使用datareader里面的中文全变成“?”,
    现在想用Oracle.DataAccess.Client处理xmltype字段,网上找了方法,但是会报 ORA-06553:PLS-306 的错
    using Oracle.DataAccess;
    using Oracle.DataAccess.Types;
    using Oracle.DataAccess.Client;
    string conString = "Data Source =testascii;Persist Security Info=True;User ID=common;Password=common";
    XmlDocument xmlDoc = new XmlDocument();
    string strProperty = @"<root>钓鱼岛是中国的</root>";
    xmlDoc.LoadXml(strProperty);
    Oracle.DataAccess.Client.OracleConnection con = new Oracle.DataAccess.Client.OracleConnection(conString);
    con.Open();
    OracleXmlType cxml = new OracleXmlType(con,strProperty);
    //OracleXmlType cxml = new OracleXmlType(con, xmlDoc);
    Oracle.DataAccess.Client.OracleCommand cmd = new Oracle.DataAccess.Client.OracleCommand();
    cmd.Connection = con;
    cmd.CommandText = @"insert into d_test values(:nvar,SYS.XMLType(:xml))";
    //Oracle.DataAccess.Client.OracleParameter p1 = new Oracle.DataAccess.Client.OracleParameter("nvar",OracleDbType.NVarchar2);
    //Oracle.DataAccess.Client.OracleParameter p2 = new Oracle.DataAccess.Client.OracleParameter("xml", OracleDbType.XmlType);
    //p1.Value = DateTime.Now.ToLongDateString();
    //p2.Value = cxml;
    cmd.Parameters.Add("nvar", OracleDbType.NVarchar2).Value = DateTime.Now.ToLongDateString();
    cmd.Parameters.Add("xml", OracleDbType.XmlType).Value = cxml;
    //cmd.Parameters.Add(p1);
    //cmd.Parameters.Add(p2);
    try
    int count = cmd.ExecuteNonQuery();
    if (count >= 1)
    MessageBox.Show("ok");
    else
    MessageBox.Show("shit");
    catch (System.Exception ex)
    MessageBox.Show(ex.Message);
    con.Close();
    这种写法会报 ORA-06553:PLS-306: XMLTYPE..这个错误
    这个如何解决呀

    US7ASCII
    U.S. 7-bit ASCII
    US
    7
    ASCII
    ASCII字符集是不包括中文的, 你使用的 NVARCHAR是 NATIONAL CHARACTER SET 的CHAR类型

  • The type initializer for 'Oracle.DataAccess.Client.OracleClientFactory'

    Hi
    Microsoft Visual Studio 2008
    Version 9.0.21022.8 RTM
    Microsoft .NET Framework
    Version 3.5 SP1
    Oracle Developer Tools for Visual Studio 11.1.0.7.20
    I have DB 11.2.0.1 installed on my machine ( OraDb11g_home1 ) and ODT in another home OraClient11g_home1 on my Windows 7 32-bits
    After installing ODT I tried to create a new DataSource, it succeeded (test connection is succesful) but while saving I get
    "The type initializer for 'Oracle.DataAccess.Client.OracleClientFactory' threw an exception." messagebox.
    In registry I have both keys
    HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\ODP.NET\2.111.7.20
    HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\ODP.NET\2.112.1.0
    of course I can connect to db from both homes.
    I've been searching for simmilar issues but have not found something that would help me solve this one.

    ODP.NET actually consists of several DLLs, some managed, some not. If you are missing one of the DLLs in the chain or it somehow picks up mismatched DLLs from several different versions then you will get this error. So if you hand copied DLL's rather than using an installer, this might be the cause.
    Another typical cause of this error is that you deployed your application to another machine (web server) and did not properly install ODP.NET over there.
    The best solution is to reinstall ODP.NET using the installer on the machine where you will run your application. If you already have ODP.NET there, make sure it is the right version and perform a clean up to make sure old versions are not lying around.

  • The type initializer for 'Oracle.DataAccess.Client.OracleConnection' threw

    Hi All,
    I am .Net developer [.Net Fream work 2.0].
    In my new windows [C#] project , I have to use oracle Database [11g] which is intalled in one of the server.
    I have installed [my local mechine] odp.net and Oracle.DataAccess.dll version is 2.111.7.20.
    I added reference the above dll and its working fine in my mechine.
    I have build the applicatrion with release option. then i moved the release folder to QA mechine [because QA team needs to test. when the are testing , they are getting below msg
    "The type initializer for 'Oracle.DataAccess.Client.OracleConnection' threw "
    Please could some one can help,
    whether i have to intall odp.net in QA mechine also ?
    thanks
    Babu                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi,
    As per my experience, Type initializer exception by ODP coulod also be due to mismatch between ODP.Net and dependant layers, especially with the service layer, which communicates with the OCI.
    So, please do following:
    - As suggested earlier, if not installed and then do install the ODP ship home on the target test machine.
    - If already installed, ensure that versions do match, essentially you cannot pick a different ODP dll and try to make it work with a different version of ship home dlls.
    thanks,
    Mrinal

  • Oracle.DataAccess.Client.OracleException: The provider is not compatible

    I am getting an error, and I don't understand why I'm getting it.
    Error:
    Oracle.DataAccess.Client.OracleException: The provider is not compatible with the version of Oracle client
    Environment:
    ODP.NET, 10.2.0.2 (ODTwithODAC10202.exe install)
    Oracle 9i database
    Windows 2000, .NET 1.x framework
    Before ODP.NET, Oracle 9.2 client
    Server does not have Visual Studio installed
    Just installed ODP.NET today; any time I attempt to access OracleConnection, I get the error above. I am a newbie to server installations; if something is obvious to you, it might not be obvious to me, so feel free to point out even the most basic things.
    I did install ODP.NET (same version) on my own PC several months ago, running over the same database, and everything seems to be working fine...
    Message was edited by:
    user531571

    Yeah; apparently, the Oracle install on that server was known (by everyone but me, from the sounds of it) to be exceptionally fragile. Installing ODP.NET brought down all Oracle connections. Uninstalling ODP.NET broke (actually, shattered might be closer to the truth) the Oracle instance on that box. Our solution? Start from scratch with a new server. Another piece of information which would have been nice to know is that they were looking for an excuse to get rid of this server; I wouldn't have been running around like a madman trying to fix it (and stressing all the while).
    So, the problem has been solved, but not in any kind of normal fashion.

  • Oracle.DataAccess.Client.OracleDataAdapter.Update not working

    Hi
    I am using the Oracle.DataAccess.Client.OracleDataAdapter from Oracle.DataAccess runtime version v4.0.30319. I set the SelectCommand and retrieve data from Oracle without any problems using the adapter to fill a datatable. I then use the DataTable.Clear method to remove all rows and fill it again from a different source using a different adapter. I use the Oracle.DataAccess.Client.OracleCommandBuilder to create the Insert and Update commands and finally I call the update command of the using the original adapter in order to update the Oracle database but nothing is updated.
    I examine the table row count at each stage and also display the table using a DataGridView on a form and all appears to be fine. No exception is thrown so I am stumped.
    I would be grateful for any suggestions as to what I am doing wrong.
    My environment is VS2010 Express
    Edited by: user1947494 on 04-Feb-2011 05:46

    Hi,
    Pretty tough without seeing any code. I really do not believe it has anything to do with the DataAdapter. What changed the specific row/rows after the second fill?
    But, as a guess, take a look at the DataTable - Rows - RowState. Run the below(or some variant) method just prior to your update.
    r,
    dennis
           public static DataTable GetDataTableChanges_Modified(DataSet dataSet, string dataTableName)
                if (dataSet.Tables[dataTableName].Rows.Count > 0)
                    DataTable dt = dataSet.Tables[dataTableName].Clone(); ;
                    int c = 0;
                    foreach (DataRow r in dataSet.Tables[dataTableName].Rows)
                        DataRowState state = r.RowState;
                        switch (state)
                            case DataRowState.Modified:
                                DataRow anewrow_dr = dt.NewRow();
                                anewrow_dr.ItemArray = r.ItemArray;
                                dt.Rows.Add(anewrow_dr);
                                c = c + 1;
                                break;
                            default:
                                break;
                    if (c > 0)
                        return dt;
                    else
                        return null;
                else
                    return null;
            }

  • Oracle.DataAccess.Client.OracleConnection

    I have been reading for hours and just cant seem to make this work. I have a window app that used the ORACLEDATAACESS.dll it works great on the pc. i made the APP but when i try to redistribute i get this nasty message. I read from these forums that i should install the ODP.net net on the computer that will get the installation and i have done that but i cant see to get anywhere. Can someone please give me a tip and point out the obvious i just dont know what to do anymore. t
    System.TypeInitializationException: The type initializer for 'Oracle.DataAccess.Client.OracleConnection' threw an exception. ---> Oracle.DataAccess.Client.OracleException The provider is not compatible with the version of Oracle client at Oracle.DataAccess.Client.OracleInit.Initialize()
    at Oracle.DataAccess.Client.OracleConnection..cctor()
    --- End of inner exception stack trace ---
    at Oracle.DataAccess.Client.OracleConnection.Dispose(Boolean disposing)
    at System.ComponentModel.Component.Finalize()
    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    Notepad
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/JAM/My%20Notepad/Notepad.exe
    Microsoft.VisualBasic
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
    System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    System.Runtime.Remoting
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
    Oracle.DataAccess
    Assembly Version: 2.111.7.10
    Win32 Version: 2.111.7.10
    CodeBase: file:///C:/Program%20Files/JAM/My%20Notepad/Oracle.DataAccess.DLL
    System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
    System.Transactions
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.
    For example:
    <configuration>
    <system.windows.forms jitDebugging="true" />
    </configuration>
    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.

    Oh interesting. I imagine there's a lot of ways that issue could crop up. Thanks!
    I am driving myself completely out of my mind having tried to move a "solution" from one computer
    to another. That is not a nobrainer. I ran into an issue on my home computer that defied all efforts to
    stop it (the cursed varchar columns) so I decided to give up and do the development at work. But the project has not liked the
    move. That is such an issue for an faq: how to design your project and whatever so that it can be
    moved from one development location to another, one database to another, and then,
    how to deploy it. And yeah now that you mention it differences in drive letters might well be a
    factor here. :-(

Maybe you are looking for