SQLX + ODP

When my query accesses a permanent clob the extraction below works fine...
When it uses SQLX (temporary CLOB), it does not work anymore...
Error message is :
Oracle Data Provider for .NET throws Data provider internal error(-3001)
Oracle.DataAccess.dll : 9.2.0.4000
Query works fine under SQLPLUS.
This is a first try, so I must be doing something wrong...
Don't know what though !!!
Any better way to do this ???
using System;
using System.Data;
using Oracle.DataAccess.Client;
using Oracle.DataAccess.Types;
class Example
     OracleConnection con;
     void Connect()
          con = new OracleConnection();
          con.ConnectionString = "User Id=alain;Password=secret;Data Source=webdoc";
          con.Open();
          Console.WriteLine("Connected to Oracle");
     void Close()
          con.Close();
          con.Dispose();
     void GetData()
          string cmdQuery = "select XMLelement (\"processGroup\", pg_name ).getclobval() from PMP_process_groups";
          OracleCommand cmd = new OracleCommand(cmdQuery);
          cmd.Connection = con;
          cmd.CommandType = CommandType.Text;
          //cmd.XmlCommandType = OracleXmlCommandType.none;
          OracleDataReader reader = cmd.ExecuteReader();
          OracleClob clob;
          while (reader.Read())
               clob = reader.GetOracleClob(0);
               Console.WriteLine("pg " + clob.Value);
          reader.Dispose();
          cmd.Dispose();
     static void Main()
          Example example = new Example();
          try
               example.Connect();
               example.GetData();
               example.Close();
          catch ( OracleException e )
          Console.WriteLine("{0} throws {1}",e.Source, e.Message);
}

This is a known issue with the provider and the fix would be available in the next patchset release.

Similar Messages

  • ODP and ADO and a trigger - problem

    I have written a simple trigger to turn on tracing for a session based on the username:
    It works fine through sqlplus. The application works when run using JDBC and native(?) java. But when we use hibernate and ODP.net and ADO.net The session goes into a loop of recursive sql and gets an ORA-36 too many recursive levels. I am not a java developer and I am at a loss on how to proceed. It appears to be firing the trigger or have fired the trigger, and then look for global_db_name until it dies.
    CREATE OR REPLACE TRIGGER gopal_user_login_trigger
    AFTER LOGON ON DATABASE
    DECLARE
         user_name VARCHAR2(30);
    BEGIN
    SELECT username INTO user_name FROM sys.V$SESSION
    WHERE audsid = USERENV('SESSIONID') AND audsid != 0 ;
    IF UPPER(user_name) = 'GOPALASSETUSER'      
    THEN
         DBMS_MONITOR.SESSION_TRACE_ENABLE(NULL, NULL, true, true);
    END IF;
    EXCEPTION
    WHEN NO_DATA_FOUND then null;
    END;

    Hi,
    Thanks for the bug number - that helped alot.
    Why the global_db_name lookup, I do not know. It appears to be part of the logon processing that follows the trigger.It is, indeed, part of the logon process and is called by internal code so that makes sense now.
    If you have MetaLink support, I would recommend opening an SR. One simple thing that I might suggest is to set "enlist=false" in your connect string if you can and test with that.
    Thanks,
    Mark

  • Performance problems with Integrated security and ODP

    Hi
    While testing performance for opening a data base connection, I notice there is a huge performace issue when using externally identified users and ODP with Oracle client 11.1.0.6 and .Net 3.5. The test is running 30 times slower with an externally identified user compared to using a database identified user.
    I also noticed that System.Data.OracleClient does not result in any significant performance penalties for externally vs database identified users.
    The test environment is Vista 64 and VS2008, and I do not notice any significant difference using 32bit vs 64bit Oracle client.
    Is this a known problem and does it exist a workaround for this?
    Kind regards
    Oyvind

    Hi,
    I'm assuming you're using 11.1.6.0 ODP, so you'd want to upgrade to 11.1.6.21 or higher ODP. Prior to that, Externally Authenticated connections were not pooled so resulted in a hard connection every time.
    If you have 111060 full client installed, applying the 11107 database patch to the cleint install will give you 11107 ODP. Or, you can add the [11106.20 ODAC bundle|http://www.oracle.com/technology/software/tech/windows/odpnet/index.html] into your existing 111060 full client home as well.
    Hope it helps,
    Greg

  • Global temp table problem w/ODP?

    I'm using the current version of the ODP .NET data adapter to access a global temporary table on an Oracle
    9.2.0.4.0 server created with -
    CREATE GLOBAL TEMPORARY TABLE euik_dex_open_tasks_temp1
    (resource_id NUMBER,
    task_assignment_id NUMBER,
    task_id NUMBER,
    incident_id NUMBER,
    customer_product_id NUMBER,
    inventory_item_id NUMBER,
    contract_service_id NUMBER)
    ON COMMIT DELETE ROWS
    (See below for what is returned from the data dictionary for this table)
    If I use SQLPlus to insert a row into this table, then query the table immediately, I see the inserted row.
    If I use the same exact SQL through the ODP adapter, the ExecuteNonQuery statement returns the fact the 1 row was inserted. However, doing a SELECT from the table immediately after the INSERT, no rows are returned. See the .NET test ap, below.
    Also, note that if I use a global temp table made with ON COMMIT PRESERVE ROWS, the ODP adapter works fine.
    What am I doing wrong? Thanks in advance...
    Pat
    Private Sub TestTempTable()
    Dim Str1 As New System.Text.StringBuilder
    Dim Strx As New System.Text.StringBuilder
    Dim StrOut As New System.Text.StringBuilder
    Dim nInsert As Integer
    Dim nRow As Integer
    'Insert into the global temp table
    Str1.Append("INSERT INTO euik_dex_open_tasks_temp1(resource_id, " & vbCrLf)
    Str1.Append("      task_Assignment_id, " & vbCrLf)
    Str1.Append("     task_id, " & vbCrLf)
    Str1.Append("     incident_id, " & vbCrLf)
    Str1.Append("     customer_product_id, " & vbCrLf)
    Str1.Append("     inventory_item_id, " & vbCrLf)
    Str1.Append("     contract_service_id) " & vbCrLf)
    Str1.Append(" VALUES(1,2,3,4,5,6,7)" & vbCrLf)
    Dim cn As New Oracle.DataAccess.Client.OracleConnection
    Dim dr As Oracle.DataAccess.Client.OracleDataReader
    Dim cd As New Oracle.DataAccess.Client.OracleCommand
    Try
    cn.ConnectionString = "Data Source=XXX;User ID=mickey;Password=mouse;"
    cd.CommandType = CommandType.Text
    cd.Connection = cn
    cn.Open()
    'Run the query to load data in the temp table
    cd.CommandText = Str1.ToString()
    nInsert = cd.ExecuteNonQuery()
    MessageBox.Show(nInsert & " row(s) inserted.")
    'See if there are rows in the temp table
    Strx.Append("Select * from euik_dex_open_tasks_temp1")
    cd.CommandText = Strx.ToString()
    dr = cd.ExecuteReader
    nRow = 0
    While dr.Read
    StrOut.Append(dr(0) & vbCrLf)
    nRow = nRow + 1
    End While
    MessageBox.Show(nRow & " row(s) selected.")
    Catch ex As OracleClient.OracleException
    MessageBox.Show(ex.Message)
    Catch ex As Exception
    MessageBox.Show(ex.Message)
    Finally
    cn.Close()
    End Try
    End Sub
    OWNER     TABLE_NAME     TABLESPACE_NAME     CLUSTER_NAME     IOT_NAME     PCT_FREE     PCT_USED     
    INI_TRANS     MAX_TRANS     INITIAL_EXTENT     NEXT_EXTENT     MIN_EXTENTS     MAX_EXTENTS     PCT_INCREASE     
    FREELISTS     FREELIST_GROUPS     LOGGING     BACKED_UP     NUM_ROWS     BLOCKS     EMPTY_BLOCKS     AVG_SPACE     
    CHAIN_CNT     AVG_ROW_LEN     AVG_SPACE_FREELIST_BLOCKS     NUM_FREELIST_BLOCKS     DEGREE     INSTANCES     
    CACHE     TABLE_LOCK     SAMPLE_SIZE     LAST_ANALYZED     PARTITIONED     IOT_TYPE     TEMPORARY     
    SECONDARY     NESTED     BUFFER_POOL     ROW_MOVEMENT     GLOBAL_STATS     USER_STATS     DURATION     
    SKIP_CORRUPT     MONITORING     CLUSTER_OWNER     DEPENDENCIES     COMPRESSION
    APPS     EUIK_DEX_OPEN_TASKS_TEMP1                    10     40     1     255               
                   1     1     NO     N                                        
         1     1     N     ENABLED               NO          Y     N     NO     
    DEFAULT     DISABLED     NO     NO     SYS$TRANSACTION     DISABLED     NO          DISABLED     
    DISABLED

    Andrew,
    As David indicated if you do not wish to have "auto commit mode" you just need to use a transaction object to manually control the transaction.
    I'm just nervous at the idea of ODP.NET initiating interactions I am not aware of.I think it would be more fair to say "finishing interactions" in this case rather than "initiating interactions" but you could always just run a SQL trace from the database to see exactly what is happening if you are concerned.
    HTH,
    - Mark
    =======================================
    Mark A. Williams
    Oracle DBA
    Author, Professional .NET Oracle Programming
    http://www.apress.com/book/bookDisplay.html?bID=378

  • How to extract data from a resultset returned by SQLX query

    Hi all,
    I'm doing a project in which I use SQLX query to extract data and format it into xml from an object-relational database, and return it to a windows application. But when the resultset is returned, I don't know how to extract and display the data from it. The datatype of returned data might be XmlType, but i don't know how to process it..Can anyone help? It's urgent.. Thanks a lot in advance...
    Joanne

    You can use XMLType.extract().

  • Insertion of Blank fails with error 01400 on ODP 9.2.0.4.0 using Parameter

    Hi everybody,
    I have a problem on inserting a blank string into a NOT NULL VARCHAR2 field by using a parameter on Oracle Data Provider for .NET (Version 9.2.0.4.0). It is possible to insert any strings with non-blank characters using a parameter and it is possible to insert blank strings using SQLPlusWorksheet, so it must be a problem of using ODP.
    It seems to me when using parameters, strings are trimmed in some way, therefore a blank string is handled like an empty string is handled like NULL.
    However, we need to insert blank strings and we really want to use parameters because of the performance gain.
    Does anybody know how to handle blank strings with parameters or is it impossible because of a bug?
    Thanks,
    Rainer
    Additional Information:
    * TABLE STRUCTURE *
    CREATE TABLE GLOBALTYPE
         GT_ID VARCHAR2 (36) NOT NULL,
         GT_NR NUMBER (5, 0) NOT NULL,
         GT_NOTE VARCHAR2 (255),
         GT_CREA DATE,
         GT_MOD DATE,
         GT_OWNER VARCHAR2 (36),
         GT_EXPORTDB VARCHAR2 (50) NOT NULL,
         GT_EXPORTDATE DATE NOT NULL,
         GT_IMPORTDB VARCHAR2 (50) NOT NULL,
         GT_IMPORTDATE DATE NOT NULL,
         GT_NAME VARCHAR2 (40) NOT NULL
    * COMMAND BEING EXECUTED *
    {Oracle.DataAccess.Client.OracleCommand}
    [Oracle.DataAccess.Client.OracleCommand]: {Oracle.DataAccess.Client.OracleCommand}
    CommandText: "INSERT INTO GlobalType (GT_ID, GT_NR, GT_NOTE, GT_CREA, GT_MOD, GT_OWNER, GT_EXPORTDB, GT_EXPORTDATE, GT_IMPORTDB, GT_IMPORTDATE, GT_NAME) VALUES (:GT_ID, :GT_NR, :GT_NOTE, :GT_CREA, :GT_MOD, :GT_OWNER, :GT_EXPORTDB, :GT_EXPORTDATE, :GT_IMPORTDB, :GT_IMPORTDATE, :GT_NAME)"
    CommandTimeout: 0
    CommandType: Text
    Connection: {Oracle.DataAccess.Client.OracleConnection}
    Parameters: {Oracle.DataAccess.Client.OracleParameterCollection}
    Transaction: {Oracle.DataAccess.Client.OracleTransaction}
    UpdatedRowSource: Both
    * PARAMETER HAVING BLANK STRING *
    {Oracle.DataAccess.Client.OracleParameter}
    ArrayBindSize: Nothing
    ArrayBindStatus: Nothing
    CollectionType: None
    DbType: String
    Direction: Input
    IsNullable: False
    Offset: 0
    OracleDbType: Varchar2
    ParameterName: ":GT_EXPORTDB"
    Precision: 0
    Scale: 0
    Size: 1
    SourceColumn: ""
    SourceVersion: Current
    Status: Success
    Value: " " {String}
    * EXCEPTION WHEN RUNNING ExecuteNonQuery ON COMMAND
    {Oracle.DataAccess.Client.OracleException}
    [Oracle.DataAccess.Client.OracleException]: {Oracle.DataAccess.Client.OracleException}
    HelpLink: Nothing
    InnerException: Nothing
    Message: "ORA-01400: Einfügen von NULL in ("TEST"."GLOBALTYPE"."GT_EXPORTDB") nicht möglich"
    Source: "Oracle Data Provider for .NET"
    StackTrace: " at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure)
    at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src)
    at Oracle.DataAccess.Client.OracleCommand.ExecuteNonQuery()

    I have same problem.
    I have 10.2 provider installed and I need to insert string.Empty in "VARCHAR2(200) NOT NULL" column:
    Here is the code:
    using (OracleConnection connection = GrinderHlp.OpenConnection(ConnectionString))
    using (OracleCommand command = connection.CreateCommand())
    command.CommandText = @"INSERT INTO dz_hist_data (par_value, time_stamp, quality, updated_when, g_time_stamp, obj_id, par_id, stat_aggr)
    VALUES (:Value, :Time, :Quality, CURRENT_TIMESTAMP, :GTime, :ObjId, :ParId, :AggId)";
    OracleParameter p1 = command.Parameters.Add("Value", OracleDbType.Varchar2, 50, ParameterDirection.Input);
    OracleParameter p2 = command.Parameters.Add("Time", OracleDbType.Date, ParameterDirection.Input);
    OracleParameter p3 = command.Parameters.Add("Quality", OracleDbType.Int16, ParameterDirection.Input);
    OracleParameter p6 = command.Parameters.Add("GTime", OracleDbType.Date, ParameterDirection.Input);
    OracleParameter p0 = command.Parameters.Add("ObjId", OracleDbType.Int32, ParameterDirection.Input);
    OracleParameter p4 = command.Parameters.Add("ParId", OracleDbType.Int32, ParameterDirection.Input);
    OracleParameter p5 = command.Parameters.Add("AggId", OracleDbType.Int32, ParameterDirection.Input);
    p0.Value = 15004;
    p1.Value = "";
    p2.Value = DateTime.Now;
    p3.Value = 192;
    p4.Value = 1974;
    p5.Value = 3;
    p6.Value = DateTime.UtcNow;
    command.ExecuteNonQuery();
    The code fails with ORA-01400.
    I tried to use OracleDbType.Char, .NChar and NVarchar2 instead of OracleDbType.Varchar2 and result was the same.
    Here is the table structure:
    CREATE TABLE dz_hist_data
    (obj_id NUMBER(16,0) NOT NULL,
    par_value VARCHAR2(200) NOT NULL,
    time_stamp DATE NOT NULL,
    quality NUMBER(3,0),
    updated_when DATE NOT NULL,
    par_id NUMBER(16,0) NOT NULL,
    stat_aggr NUMBER NOT NULL,
    diff_value NUMBER,
    diff_ts DATE,
    new_data CHAR(1) DEFAULT '1',
    param_cond_id NUMBER,
    g_time_stamp DATE
    Can you help me?

  • Availability of  DbProviderFactory in ODP

    Does anyone know if Oracle or someone has created a DbProviderFactory for ODP. From the page
    http://msdn.microsoft.com/en-us/library/cy5kfe3c(v=VS.80).aspx
    ADO.NET 2.0 introduces new base classes in the System.Data.Common namespace. The base classes are abstract... They include DbConnection, DbCommand, and DbDataAdapter
    The Factory Design Pattern
    The programming model for writing provider-independent code is based on the use of the "factory" design pattern, which uses a single API to access databases across multiple providers. This pattern is aptly named, as it calls for the use of a specialized object solely to create other objects, much like a real-world factory.

    I may be missing the point here, but what are you looking for? ODP supports factory classes when support for ADO.NET 2.x was introduced in 10.2.0.2.21, and factory class code is generic.
    If you click the "Writing Generic Data Access Code in ASP.NET 2.0 and ADO.NET 2.0" link in the URL you've referenced, you'll see sample code. To change that code to use ODP, simply change
    DbProviderFactory provider = DbProviderFactories.GetFactory("System.Data.SqlClient");
    to
    DbProviderFactory provider = DbProviderFactories.GetFactory("Oracle.DataAccess.Client");
    and provide an appropriate connect string.
    Note however that you won't be able to take advantage of a lot of the functionality built into ODP without introducing ODP specific code, as the common framework is somewhat like ODBC in that it's written to the lowest common functionality.
    Corrections/comments welcome, hope it helps.
    Greg
        DbProviderFactory provider = DbProviderFactories.GetFactory("Oracle.DataAccess.Client");
        DbConnection con = provider.CreateConnection();
        con.ConnectionString = @"Data Source=mytnsnamesalias; user id=myuid;password=mypwd";
        DbCommand com = provider.CreateCommand();
        com.Connection = con;
        com.CommandText = "Select * From Subscribers";
        com.CommandType = CommandType.Text;
        DataSet ds = new DataSet();
        DbDataAdapter ad = provider.CreateDataAdapter();
        ad.SelectCommand = com;
        con.Open();
        ad.Fill(ds);
        con.Close();
        return ds.Tables[0].DefaultView;Edited by: gdarling on Jun 18, 2010 10:27 AM

  • How to create SAP Extractor based ODP on Hana?

    Hi SAP Gurus,
    I am a HANA begginer and trying to create an SAP extractor based ODP.
    Till now i have created a source system under "ODP - SAP (Extractors)" node of source system screen. I didn't enter any source system and type because there was no choice in the help list.
    Connection test and authorization test through sm59 are working with no problem.
    In the source system i activated  datasource 0FI_GL_4 and made sure that's working through rsa3 . I can retrieve more than 1000 line of data. So everything seems alright but when i try to replicate data source in HANA system i got this error;
    "Destination DTYIDS_IDS_00: ping waiting time (5 seconds) exceeded
    Message no. RSDS571"
    Some information on this issue and latter steps in order to create an ODP will be greatly appreciated.
    Best regards,
    Yağız

    I got the solution.
    CREATE OR REPLACE FUNCTION conv_str_to_date(c VARCHAR2) RETURN DATE
    deterministic AS
    BEGIN
    RETURN(TO_DATE(c,'MM/DD/YY'));
    END;
    CREATE INDEX my_date_index ON XML_TEST
    et (conv_str_to_date (et.xml_msg.extract('//DDate/text()').getStringVal()));

  • Active ODP when both 9 and 10g are installed...

    I have both ODP 9i and ODP 10g (along with the Oracle 10g client) installed on my workstation. How does one set up one or the other to be the 'active' ODP client? For instance, I have an application that I developed under ODP 9i... because I developed this under ODP 9, I want it to run under ODP 9 on my or anyone else's workstation. However, when I view it in the Visual Studio 2003 IDE, it shows ODP 10 as the 'active' client. Even when I run it, I find it is using ODP 10 (I know this because I have a Help...About screen in my runtime that displays the loaded assemblies) Even if I install it on a plain workstation (i.e. no Visual Studio 2003) with both 9i and 10g installed, and even though it was fully compiled using 9i, it still shows up as using the 10g ODP client. I don't want that at this time - if I compile it under 9i I want it to use Oracle 9i... Otherwise, what is the sense of having both clients on the machine?
    So.... bottom line... is there a way to set one of the ODP clients to be 'active' even though both clients are installed?
    Thanks in advance.
    Tom

    Hi,
    By default, ODP installs publisher policy files to redirect to the latest version of ODP, which would make an app compiled with 92x odp use the 10x odp instead. If you dont want that to happen, delete the oracle.dataaccess publisher policy files from the GAC, but then you'll get no redirection at all. IE, you'll have to have the exact version the app was compiled with on that box to run the app.
    Or, as msolnit pointed you to above, there's an article on the MS site that explains more about it, and other ways to prevent it on a per-application basis (see the Bypassing Publisher Policy section of that article)
    Cheers, hope it helps.
    Greg

  • How to define a output parameter in C# which maps to a PL/SQL table (odp)?

    OracleConnection objconnection = new OracleConnection(connectionstring);
    OracleCommand objcommand = objconnection.CreateCommand();
    objcommand.Connection = objconnection;
    objcommand.CommandText = "UBE_XSITE_PKG_V2.SP_DATAUPLOAD";
    objcommand.CommandType = CommandType.StoredProcedure;
    ListBox1.SelectedIndex = 0;
    OracleParameter prm1 = new OracleParameter("PI_LOT", OracleDbType.Varchar2);
    prm1.Direction = ParameterDirection.Input;
    prm1.Value = ListBox1.SelectedValue.ToString();
    objcommand.Parameters.Add(prm1);
    OracleParameter prm2 = new OracleParameter("PI_WS_OP", OracleDbType.Int32);
    prm2.Direction = ParameterDirection.Input;
    prm2.Value = (float)Int32.Parse(TextBox3.Text);
    objcommand.Parameters.Add(prm2);
    OracleParameter prm3 = new OracleParameter("PI_SOURCE_SITE", OracleDbType.Varchar2);
    prm3.Direction = ParameterDirection.Input;
    prm3.Value = DropDownList1.SelectedValue.ToString();
    objcommand.Parameters.Add(prm3);
    OracleParameter prm4 = new OracleParameter("PI_WS_FLAG", OracleDbType.Varchar2);
    prm4.Direction = ParameterDirection.Input;
    prm4.Value = DropDownList5.SelectedValue.ToString();
    objcommand.Parameters.Add(prm4);
    OracleParameter prm5 = new OracleParameter("PI_WS_QTY", OracleDbType.Int32);
    prm5.Direction = ParameterDirection.Input;
    prm5.Value = (float)Int32.Parse(TextBox2.Text);
    objcommand.Parameters.Add(prm5);
    OracleParameter prm6 = new OracleParameter("PO_EXCEPTIONS", OracleDbType.Varchar2);
    prm6.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
    prm6.Direction = ParameterDirection.Output;
    prm6.IsNullable = true;
    prm6.Size = 4000;
    objcommand.Parameters.Add(prm6);
    objconnection.Open();
    objcommand.ExecuteNonQuery();
    objconnection.Close();

    Hi,
    You'll need to provide more detail about what the plsql type is exactly.
    However, you should check the ODP docs for examples, and it installs complete examples on your hard drive as well which will probably show you what you need to know.
    As of 11.1.6.20, ODP.NET supports user defined types. Prior to that, it also supports Associative Arrays (Index-by tables).
    Hope it helps
    Greg

  • Data set in Data not fill properly using ODP(Oracle.DataAccess.dll 64bit)

    public void BindFun()
                OracleParameter[] o_OracleParameters;
                OracleConnection o_Connection = new OracleConnection(VRODPConnection());
                OracleCommand o_OracleCommand = new OracleCommand();          
                OracleDataAdapter o_OracleDataAdapter;    
                DSSearchResults = new DataSet();
                // Narendra : 03/11/2014
                o_OracleParameters = new OracleParameter[16];
                o_OracleParameters[0] = new OracleParameter("iv_LastName", OracleDbType.Varchar2, ParameterDirection.Input);
                o_OracleParameters[0].Value = "";
                o_OracleParameters[1] = new OracleParameter("iv_FirstName", OracleDbType.Varchar2, ParameterDirection.Input);
                o_OracleParameters[1].Value = "";
                o_OracleParameters[2] = new OracleParameter("iv_MiddleName", OracleDbType.Varchar2, ParameterDirection.Input);
                o_OracleParameters[2].Value = "";
                o_OracleParameters[3] = new OracleParameter("iv_MotherMaidenLastName", OracleDbType.Varchar2, ParameterDirection.Input);
                o_OracleParameters[3].Value = "";
                o_OracleParameters[4] = new OracleParameter("v_SearchRangeFrom", OracleDbType.Varchar2, ParameterDirection.Input);
                o_OracleParameters[4].Value = "01-01-2014";
                o_OracleParameters[5] = new OracleParameter("v_SearchRangeTo", OracleDbType.Varchar2, ParameterDirection.Input);
                o_OracleParameters[5].Value = "12-01-2014";
                // "01-12-2014";//Narendra 04/11/14 14:17//
                o_OracleParameters[6] = new OracleParameter("v_RecordTypeId", OracleDbType.Varchar2, ParameterDirection.Input);
                o_OracleParameters[6].Value = "2,4,5";
              // IN this
                o_OracleParameters[7] = new OracleParameter("v_PagingRequired", OracleDbType.Int32, ParameterDirection.Input);
                o_OracleParameters[7].Value = 1;
                o_OracleParameters[8] = new OracleParameter("v_PageNum", OracleDbType.Int32, ParameterDirection.Input);
                o_OracleParameters[8].Value = 1;
                o_OracleParameters[9] = new OracleParameter("v_PageSize", OracleDbType.Int32, ParameterDirection.Input);
                o_OracleParameters[9].Value = 1000;
                o_OracleParameters[10] = new OracleParameter("v_SortFieldName", OracleDbType.Varchar2, ParameterDirection.Input);
                o_OracleParameters[10].Value = "VitalRecordsLastName";
                o_OracleParameters[11] = new OracleParameter("v_Sealed", OracleDbType.Int32, ParameterDirection.Input);
                o_OracleParameters[11].Value = 1;
                o_OracleParameters[12] = new OracleParameter("v_CurrentRecordsOnly", OracleDbType.Int32, ParameterDirection.Input);
                o_OracleParameters[12].Value = 0;
                o_OracleParameters[13] = new OracleParameter("v_AccessID", OracleDbType.Int32, ParameterDirection.Input);
                o_OracleParameters[13].Value = 5;
                o_OracleParameters[14] = new OracleParameter("v_TotalRecs", OracleDbType.Int32, ParameterDirection.Output);
                o_OracleParameters[14].Value = 0;
                o_OracleParameters[15] = new OracleParameter("pResult", OracleDbType.RefCursor);
                o_OracleParameters[15].Direction = ParameterDirection.Output;
                o_Connection.Open();
                o_OracleCommand.Connection = o_Connection;
                o_OracleCommand.CommandText = "VR_AllGeneral_Search";
                o_OracleCommand.CommandType = CommandType.StoredProcedure;
                o_OracleCommand.Parameters.AddRange(o_OracleParameters);      
                o_OracleDataAdapter = new OracleDataAdapter(o_OracleCommand);o_OracleDataAdapter.Fill(DSSearchResults);
               dataGridView1.DataSource = DSSearchResults.Tables[0];
                o_Connection.Close();
                o_Connection.Dispose();
              // 2 pass than ans total record =127 than after pass 4 ans =413 than after 5 ans=413
              // 4 pass than ans total record =286 than after pass 2 ans =413 than after 5 ans=413
               // 5 pass than ans total record =0 than after pass 2 ans =127 than after 4 ans=413
    What is the problem of above code pls info 

    Hi,
    but when i install oracle express edition 10g on that machine i am able to connect to the remote database
    Does the client machine have an Oracle Client installed before you do this at all? An Oracle Client is required in some fashion to use ODP.NET - either a full-client or the instant client if you are using a version that supports instant client.
    - Mark

  • Need information on running Oracle stored procedures from VB using ODP

    Hi. I'm trying to run some complex queries on a list of Oracle databases from a VB application using ODP.
    I've been able to execute simple queries formatted as strings on all 150 databases with no problems. Now, however the queries are more than 100 lines, and it's not practical to handle them as strings.
    Can anyone point me to reference material or some samples that would show how to to this?
    I've gone through this forum, but I haven't found anything starting from the very basics, which is what I need.
    Many thanks

    It might be easier just to break down the queries into smaller peices and execute them in sequence, then put the results together later.

  • How to bundle ODP with my app?

    I wrote a utility in .NET with ODP for a customer. The packages works on my development machine because I have OADC and ODP here. But the customer doesn't have that, and if he wants to install it he needs to go through some arduous process to get approval. Is there anyways I can just bundle the necessary dlls with the utility?
    I did find an xcopy of ODP on Oracle's download site, but it's only available in 11g. The customer's Oracle database is version 10.2g.
    How can I bundle ODAC and ODP for 10.2?

    The Oracle 11.2 Client is interoperable with the 10.2 DB server. There is no need to use the 10.2 client with the 10.2 DB server.
    Chapter 2 in the ODP.NET documentation says that Oracle 11.2 Client is certified with Oracle DB 9.2 and higher.

  • ODP not showing up in provider list

    Hello all,
    I just finished installing odt, and while it looks as though I have some functionality, when I try to configure a SqlDataSource, Specify a new connection in the visual studio server explorer, Drag and drop a DataTable adapter, or any other task which requires I specify an ado.net data provider, the ODP provider doesn't show up in the list of providers. Any ideas?
    sincerely,
    Mordecai Zibkoff

    I have mentioned this in an earlier post but probably worth repeating here:
    You can drag a table from the oracle explorer onto a form which will result in the creation of a dataadapter. If you then right-click on the adapter and choose generate dataset then this will cause a typed dataset to be generated which can then be used as a datasource.
    This should answer your main requirement (which is to have a typed dataset) even though you can't use the dataset designer in the normal way. I believe that once the dataset has been generated, you should be able to edit it in the normal way. However, you will not be able to create TableAdapters as these also require you to select a provider. It should be possible to create a TableAdapter in code though.
    As for the assertion that changes to the table definitions will be caught at compile time due to the typed dataset, if you mean changes to the DataSet definitions, then you are correct. However I don't believe that changes to the database tables will be caught this way as this would require validating the dataset definitions against a database at compile time and I do not believe that this is what happens. If I am wrong on this, could someone please post a link to any documentation concerning this?
    Message was edited by:
    Alastair Green

  • Wrong number or types of parameters after upgrading to ODP 11.2.0.1.1 Beta

    Hi,
    I have the below Oracle procedure with two parameters , the first one i IS TABLE OF number INDEX BY BINARY_INTEGER, and the second one is of type Ref cursor of predifned RECORD type.
    PROCEDURE Proc1(p_proj_comp_no_list IN core_util.ref_t,
    p_proj_comp_post_query_cursor OUT t_proj_comp_post_query_cursor
    ) IS
    This has been working fine while we were using DEVART Oracle drivers. however, as soon we move to ODP 11.2.0.1.1 Beta version we get the below error while executing the procedure via ODP.
    {"ORA-06550: line 1, column 7:\nPLS-00306: wrong number or types of arguments in call to 'PROJ_COMP_POST_QUERY'\nORA-06550: line 1, column 7:\nPL/SQL: Statement ignored"}
    Below is the debug watch result of the two parameters of the COMMAND being executed.
    Best Regards,
    Prabhakar
    +          *base     {P_PROJ_COMP_NO_LIST}     System.Data.Common.DbParameter {Oracle.DataAccess.Client.OracleParameter}*
              ArrayBindSize     null     int[]
              ArrayBindStatus     null     Oracle.DataAccess.Client.OracleParameterStatus[]
              CollectionType     None     Oracle.DataAccess.Client.OracleCollectionType
              DbType     String     System.Data.DbType
              Direction     Input     System.Data.ParameterDirection
              IsNullable     false     bool
              Offset     0     int
              OracleDbType     Long     Oracle.DataAccess.Client.OracleDbType
              OracleDbTypeEx     Long     Oracle.DataAccess.Client.OracleDbType
              ParameterName     "P_PROJ_COMP_NO_LIST"     string
              Precision     0     byte
              Scale     0     byte
              Size     1     int
              SourceColumn     ""     string
              SourceColumnNullMapping     false     bool
              SourceVersion     Current     System.Data.DataRowVersion
              Status     Success     Oracle.DataAccess.Client.OracleParameterStatus
              UdtTypeName     ""     string
    +          Value     {long[1]}     object {long[]}
    +          Static members          
    +          Non-Public members          
    -          [1]     {P_PROJ_COMP_POST_QUERY_CURSOR}     object {Oracle.DataAccess.Client.OracleParameter}
    +          *base     {P_PROJ_COMP_POST_QUERY_CURSOR}     System.Data.Common.DbParameter {Oracle.DataAccess.Client.OracleParameter}*
              ArrayBindSize     null     int[]
              ArrayBindStatus     null     Oracle.DataAccess.Client.OracleParameterStatus[]
              CollectionType     None     Oracle.DataAccess.Client.OracleCollectionType
              DbType     Object     System.Data.DbType
              Direction     Output     System.Data.ParameterDirection
              IsNullable     false     bool
              Offset     0     int
              OracleDbType     RefCursor     Oracle.DataAccess.Client.OracleDbType
              OracleDbTypeEx     RefCursor     Oracle.DataAccess.Client.OracleDbType
              ParameterName     "P_PROJ_COMP_POST_QUERY_CURSOR"     string
              Precision     0     byte
              Scale     0     byte
              Size     0     int
              SourceColumn     ""     string
              SourceColumnNullMapping     false     bool
              SourceVersion     Current     System.Data.DataRowVersion
              Status     Success     Oracle.DataAccess.Client.OracleParameterStatus
              UdtTypeName     ""     string
    +          Value     {}     object {System.DBNull}
    +          Static members          
    +          Non-Public members

    Hi,
    Can you please show the actual code that creates and appends the parameters instead, along with cmd.commandtext?
    Thanks
    Greg
    Edited by: gdarling on Jun 30, 2010 11:54 AM
    Also note that unless you're using Oracle Developer Tools for VS to generate the code, this would probably be more appropriate in the ODP forum:
    ODP.NET

Maybe you are looking for