Oracle ORAOLEDB Provider removes trailing blanks in parameter values of Type IN CHAR

Hi,
I often use StoredProcedures With Ref_Cursor parameters to read data from an Oracle 11g DB.
Because we use VARCHAR2 columns in our tables, we have to pad blanks for an exact match, the Input Parameter has to contain For example "WW2 ",
This was working fine over the years using the Microsoft-Ado Provider MSDAORA ( with Excel 10, VBA ).
Now we want to use the Oracle ORAOLEDB Provider. In our tests all resultsets were empty(rs.EOF/rs.BOF)
The reason is, that inside the StoredProcedure  the ParameterValue was trimmed ( "WW2" ), and so the Where-Clause doesn't match.
Is it possible to change this behaviour( bug or bad feature ? ) by setting a property of an object , in registry or somewhere else ?
I am aware of the differences between the two character types VARCHAR2 / CHAR ( blankpadded / no blankpadded compare ).
But the parameters of the stored procedure is CHAR (fixed length). and in this case strings are usually padded with blanks, and so I think, that no component has to modify a fixed length object,
especially if the length of the parameter is a hard setting in vba code( Set Param = SqlCmd.CreateParameter("strAnlage", adChar, adParamInput, 4) , and in PL/SQL : strAnlage IN CHAR ).
Thanks.
Best regards
Dirk

Can you post how you are trying to call the procedure from a package body?
Check this:
SQL> create or replace package hits_11 as
  2  procedure my_process(a number);
  3  end;
  4  /
Package created.
SQL> create or replace package body hits_11 is
  2  procedure my_process(a number) is
  3  begin
  4  dbms_output.put_line(a);
  5  end;
  6  end;
  7  /
Package body created.
SQL> exec hits_11.my_process;
BEGIN hits_11.my_process; END;
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'MY_PROCESS'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
SQL> exec hits_11.my_process(1);
1
PL/SQL procedure successfully completed.
SQL>

Similar Messages

  • Parameters - trailing blank

    Hi,
    There exists a report that has been used for awhile. Someone called to say that she is getting an empty report when requesting a specific project.
    I will not summarize all the checking that I did, but suffice it to say that through all my checking I found that if I run the report in Hebrew and not in English, the report gives the correct data.
    The parameter of the project includes the code and the description. It seems to me that both the parameter and the field really come from the same place and, therefore, the condition should be valid. However, using the LENGTHB function, there is a difference of one character.
    If when I choose the project from the list of values I add a blank at the end of the description, the report runs fine.
    I find it hard to believe, but could it be that PLUS automatically trims trailing blanks?
    Thanks.
    Leah

    Hi,
    What is the datatype of the parameter ? is it varchar or char ?
    the varchar type always trims the trailing blanks,
    If you do like to use the trailing blanks then you need to use the char type but you will need to always enter a fixed number of characters.
    And yes there is a difference between the Hebrew and the English characters lenght (8 vs 16)
    Try to concatenate the space at the end of the parameter using calculation and then use it in the condition instead of using the parameter directly.
    Tamir

  • Oracle Data Provider (ODP) Passing Arrays to PL/SQL

    Does anyone know how to pass an array or collection of data (from VB.net) to PL/SQL using the new Oracle Data Provider?
    My PL/SQL procedure is accepting type Table (Table array).
    This was easily done with Oracle Objects (in VB6) but I've found no way to do this with the new provider with .Net.
    It seems like a serious limitation if it can't be done.
    Anyones help would be appreciated.

    Just out of interest, what are the performance implications of using REF CURSORS for retrieving resultsets from Oracle stored procedures via ODP.NET?
    When coding the PL/SQL for these, the REF CURSOR is left OPEN and not explicitly CLOSED. When does the cursor actualy get closed? Is there a risk of reaching "maximum open cursors" or some other limit more quickly if REF CURSORS are used in this manner?
    I haven't found any documentation of this issue as yet.

  • Error while exporting : ORA-24801: illegal parameter value in OCI lob funct

    hello,
    I am doing an export on a 10.2.0.4 , solaris machine.
    The table i am doing an export has a blob & clob.
    During the export I get the error :
    EXP-00056: ORACLE error 24801 encountered
    ORA-24801: illegal parameter value in OCI lob function
    In metalink it was given : Check every parameter in the OCI Lob function call to make sure they
         are correct. Offsets should be greater than or equal to one.
    Where should I check for that OCI Lob function. Or is there any other alternative to do the export.
    Thanks for any help.

    I have increased the space on the mount I was doing the export and that solved the problem.
    Thanks

  • Apex: Removing leading and trailing blanks

    Hi,
    when observing end users working with my little apex application I noticed the input of leading and trailing blanks in a report search field. What do you recommend for removing this undesired input?
    I tried an ltrim(rtrim(:p1_searchfield)) in the report SQL query - the result is fine.
    But I have not found a way to keep the higlighting of the search word in the result set. There is a "highlight" property in the report field attributes dialog. But it looks like there is no way to enter any trim funtion over there. So the highlighting of matches does not work if there is a leading or trailing blank.
    Any ideas?
    Thanks & Cu
    Walter

    Walter,
    I would use an "after submit" computation on :p1_searchfield
    trim(:p1_filter)This way you won't have to change your select statement and the highlight term.
    ~Dietmar.

  • How do I remove a trailing blank page

    This is my first day using Adobe Acrobat Pro.  I was given a document and it last page (page 3) is blank.  How do I remove the blank page.
    I've look on the internet and it talks about something called "preflight" which I have no idea what that is.  I have Adobe Pro XI on Windows and I do not see a "preflight" menu option anywhere on the menu.
    Dennis

    Open the Pages panel on the left, select the page and press Delete.

  • File Content Conversion Removes Leading Blank/Space

    I'm having a problem where file content conversion is trimming leading blanks/space/whitespace from fields when reading in the inbound file.  I've seen where people have posted that you need to use fieldContentFormatting to prevent content conversion from stripping the leading/trailing whitespace.  I added that parameter to my list (see below example) but it still appears to be trimming the leading whitespace.  Look forward to hearing your thoughts.  Here are the details:
    I'm using fixed length file content conversion for Sender File Adapter (SP15).  I have the following parameters set:
    Document Name = MaterialData
    Recordset name = item
    Recordset Structure = MaterialLine, 1
    I have:
    MaterialLine.fieldNames = matno_external, mat_description
    MaterialLine.fieldFixedLengths = 40, 40
    MaterialLine.fieldContentFormatting = nothing, nothing
    The following is the input file (notice spaces prior to second occurrence of material numbers)
    ZED00000001                             AIMS LIGHT A
    ZED00000001                            AIMS LIGHT B
    ZED00000002                             AIMS SWITCH A
    ZED00000002                            AIMS SWITCH B
    ZED00000003                             AIMS SEMICONDUCTOR A
    ZED00000003                            AIMS SEMICONDUCTOR B
    The following is the source XML after file content conversion from SXMB_MONI (note spaces no longer exist in matno_external tag).
    <?xml version="1.0" encoding="utf-8" ?>
    - <ns:MaterialData xmlns:ns="http://xxxxxxx.com/yyy/test">
    - <item>
    - <MaterialLine>
      <matno_external>ZED00000001</matno_external>
      <mat_description>AIMS LIGHT A</mat_description>
      </MaterialLine>
      </item>
    - <item>
    - <MaterialLine>
      <matno_external>ZED00000001</matno_external>
      <create_date>10/09/06</create_date>
      <mat_description>AIMS LIGHT B</mat_description>
      </MaterialLine>
      </item>
    - <item>
    - <MaterialLine>
      <matno_external>ZED00000002</matno_external>
      <mat_description>AIMS SWITCH A</mat_description>
      </MaterialLine>
      </item>
    - <item>
    - <MaterialLine>
      <matno_external>ZED00000002</matno_external>
      <mat_description>AIMS SWITCH B</mat_description>
      </MaterialLine>
      </item>
    - <item>
    - <MaterialLine>
      <matno_external>ZED00000003</matno_external>
      <mat_description>AIMS SEMICONDUCTOR A</mat_description>
      </MaterialLine>
      </item>
    - <item>
    - <MaterialLine>
      <matno_external>ZED00000003</matno_external>
      <mat_description>AIMS SEMICONDUCTOR B</mat_description>
      </MaterialLine>
      </item>
      </ns:MaterialData>

    Thanks all for your attempts but I figured it out and wasn't this the biggest case of irony.
    Here I was trying to prevent leading spaces from being trimmed in the loading of my file and my problem was that when I typed:
    MaterialLine.fieldContentFormatting
    I actually left a "blank" at the end of the "g" in Formatting.  Apparently XI didn't like that and neither gave me a runtime or compile error.  Anyway I found this and though I'd share in case anyone else encounters it.  I removed the blank and all is working now.

  • Oracle Instant Client and OUT Parameter of custom type in Stored Procedures

    Hi @ all!
    I try to set up a simple client application, that calls a stored procedure via Instant Client from C#.
    The stored procedure and assiciated types looks like this:
    TYPE MYVALUE AS OBJECT
          Id      INTEGER,
          value     FLOAT
    TYPE MYVALUELIST AS TABLE OF MYVALUE;
    PROCEDURE ReadValues( ID IN INTEGER,
                                        RESULTSET OUT MYVALUELIST)
                                           IS
    ...I created an Oracle Command executing this SP and added OracleParameters for ID and (where I got stuck) the RESULTSET.
    Is it possible to pass a parameter with a custom type from C# in some way?
    I already tried it as a function with SELECT * FROM TABLE(ReadValues(1));
    With my parameter RESULTSET as the RETURN type. But since I use DML within the procedure, this does not work inside of a query...
    Any suggestions?
    Thanks in advance!

    Hi Greg!
    Sorry, I misunderstood the forum topic then. =(
    Anyway, in the example you provided in the link, this is nearly exactly my situation. But there the Oracle.DataAccess.Client is used, where the OracleDBType can be called to initialize an object of type person. I use the instant client libraries called by using System.Data.OracleClient. There is only the OracleType enum, that does not contain an object or something similar.
    So I do it right now after trying a bit with a ref cursor parameter and an OracleDataAdapter - the ref cursor is passed back from Oracle as a DataReader, so die DataAdapter is able to use it for a .Fill():
    OracleCommand cmd = new OracleCommand();
    cmd.Parameters.Add("RESULTSET", OracleType.Cursor).Direction = ParameterDirection.Output;
    OracleDataAdapter odr = new OracleDataAdapter(cmd);
    DataTable result = new DataTable();
    odr.Fill(result);Within my stored procedure I just added the following OUT parameter:
    PROCEDURE ReadValues( ID IN INTEGER,
                                        RESULTSET OUT sys_refcursor)
                                           IS
    currentlist MYVALUELIST;
    ... [Adding elements to that list] ...
    OPEN resultset for select * from TABLE(currentlist);It works now, but I don't like that solution that much since I'm always afraid that there are lots of opened cursors idyling around. Do I have to close this one explicitly after filling my table by the DataAdapter?
    Regards

  • Oracle.Oledb provider returning improper out-put

    Dear All,
    Need your help in below issue.
    I have SSIS package which pull data from Oracle to SQL Server.
    Currently I have used Oracle.Oledb provider for the same, but it is giving me improper result.
    I check on oracle end count for that table was 26000 and when I run the same query through SSIS it shows 0 rows.
    The preview of the query is showing 0 as output.
    but when I tried the same using Microsoft OLEDB provider for Oracle it giving me proper out-put

    Hi Sushant,
    UseSessionFormat - specifies whether to use the default NLS session formats or let OraOLEDB override some of these formats for the duration of the session. Valid values are 0 (FALSE) and 1 (TRUE). The default is FALSE which lets OraOLEDB override some of
    the default NLS session formats. If the value is TRUE, OraOLEDB uses the default NLS session formats.
    Setting UseSessionFormat=true in the connection string will result in the provider using the session format specified by the client install, which should resolve this issue. The following connection string for the connection like below:
    Data Source=DataSourceNameHere;User ID=UserIDHere;Password=PasswordHere;Provider=OraOLEDB.Oracle.1;Persist Security Info=True;UseSessionFormat=True;
    Reference:
    http://blogs.msdn.com/b/dataaccesstechnologies/archive/2012/01/20/every-bug-is-a-microsoft-bug-until-proven-otherwise.aspx
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Oracle OleDB Provider VS MS OleDB Provider

    I am using Stored Procedures in Oracle Packages and Microsoft ADO for data access.
    My Stored Procedure use a Ref Cursor output parameter to make data available to ADO's recordsets.
    A big difference in network traffic is found between "Microsoft OLEDB Provider for Oracle" and "Oracle OLEDB Provider" (the native driver provided by Oracle).
    The main issue :
    <<Oracle OLEDB Provider>>
    1) A stored procedure is put into an empty package for testing and returning no row, the result is 4KB downstream traffic.
    2) When the SAME stored procedure is put into a large package (a package that already contained 30 other stored procedures, > 1000 lines codes), the result is 70KB downstream traffic for same call that return no row.
    <<Microsoft OLEDB Provider>>
    1) and 2) both use approximately 4KB downstream traffic.
    However, for a query that return large number of rows (~2000 rows), Oracle OLEDB Provider used 143KB but MS OLEDB Provider used 400KB downstream.
    The behaviours for upstream are similar.
    My application is required utilize limited bandwidth, the the strange behaviour of the Oracle OLEDB Provider make my development of "Packaged" Stored Procedures a big problem.
    Does anyone know if there are any tricky on the Oracle OLEDB Provider? Please advice, thanks in advance.
    Regards,
    Jeff

    Sounds like the bug 2597418 that was fixed and released in 9.2.0.2 of Oracle OLEDB Provider

  • Append hint + ADO + Oracle OleDB Provider

    Hi everybody!
    This is my first post here in this great forum! ;-)
    I have a problem using Append hint with Oracle OleDB Provider and I've been searching internet for an answer without any luck.
    I'm trying to use Append hint with ADO + Oracle OleDB Provider (OraOLEDB.Oracle.1), like in the SQL below:
    INSERT /*+APPEND*/
    INTO my_table(field1, field2, field3)
    SELECT 0 field1, v.field2, v.field3)
    FROM my_second_table v
    The problem: Oracle is still creting log for this INSERT (It is working like there was no Append hint).
    If I use the same SQL statement with Microsoft Ole DB Provider for Oracle, the Append hint works as expected (log is not created), but doesn't work at all with Oracle DB Provider.
    Trace shows me that the SQL sentence is ok (the append hint is there!).
    I've tried Oracle servers 9.2 and/or 10g, and the problem is the same.
    Question: Does Append hint work with Oracle OleDB Provider? If yes, why it is not working? Something related with connection properties?
    Any help will be much appreciated!
    Thanks in advance.
    Alexandre Machado

    user8010279 wrote:
    Hi Solomon, thanks for you answer.
    Is the same SQL against the same database, with the same program, using ADO + OleDB Provider.
    The table is in NOLOGGING mode.
    When I use Microsoft OleDB Provider for Oracle there is no log creation. Then I disconnect and reconnect to the same server/database, using Oracle OleDB Provider. Then I execute the same SQL and.... there IS log creation, meaning that in that scenario, append hint is being ignored. I can't figure out WHY!!! :-(
    Alexandre,
    I'm not sure what you mean by "there is log creation". In general you need to distinguish between UNDO and REDO generation. A direct-path insert (APPEND hint) doesn't generate undo but still can generate redo, depending on the ARCHIVELOG / FORCE LOGGING mode of the tablespace resp. database and the LOGGING/NOLOGGING attribute of the table.
    Note that in case indexes exist on the table there will always be undo and therefore redo generation for the index maintenance as part of the direct-path insert.
    You should check V$SESSION (SQL_ID in 10g, SQL_ADDRESS + SQL_HASH_VALUE in pre-10g) and V$SQL in the database to double check if the SQL passed by the Oracle OLEDB Provider actually contains the APPEND hint in case the INSERT actually generates UNDO (which is the indicator that shows you if the direct-path insert is used or not). Whether it generates REDO is - as already mentioned - depending on other factors.
    So the question is how have you determined if the direct-path insert mode has been used or not?
    The simplest approach to test if direct-path insert mode is used or not is to issue a query on the object inserted into after the insert before committing the transaction. If it fails with "ORA-12838: cannot read/modify an object after modifying it in parallel" then you successfully inserted using direct-path insert.
    Note that there a number of restrictions that prevent the direct-path insert from happening, in those cases the APPEND hint will be silently ignored, e.g. enabled triggers, foreign keys on the table. A quite comprehensive list of restrictions is listed in the manuals here:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28313/usingpe.htm#CACEJACE
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • MTS, OraOLEDB provider, and Connection Pooling

    I have read through "Using Microsoft Transaction Server with Oracle8" (http://technet.oracle.com/doc/oracle8i_816/nt.816/a73029/prog.htm#1082299) and the OraOLEDB provider document, and found little coverage in regard to the subject of "Connection Pooling." Could you point me to additional documentation and code samples that would help guide me in designing my application.
    I am designing a web based distributed application subsystem with MTS/COM+, OraOLEDB provider (8.1.7.2.0), Oracle Services for MTS (8.1.7.0.0) and Oracle 8i (8.1.6). A major requirement of this subsystem is that it scales well as it is utilized by more and more applications and users. This requirement could be accomplished much easier if the OraOLEDB Provider provides Connection Pooling. Much of the documentation I have seen from Microsoft describes Connection Pooling using ODBC. The documentation from Oracle discusses Connection Pooling with OO4O or OCI. Does the OraOLEDB Provider provide Connection Pooling? If so could you point me to additional documentation and samples?
    Thanks,
    Bryan Wood

    I am facing the same issue. This is strange, no one has responded to this for a year. What does it mean? It sux so bad that no one uses OmniPortlet? It's clear when you execute a sql thru this stupid OmniPortlet it opens a connection and never releases it. I have seen this by turning off everything and keep refreshing the OmniPortlet.
    What bothers me more is that there seems to be no freakn documentation on this especially around how to do this from the console and how to use the jndi datasource. There has to be a way. Please help us out on this either from inside or outside oracle.
    The world class Oracle support seems to be a joke.

  • Export to text removes trailing spaces in XI R2

    I've found an article that talks about the problem of the export to text removing trailing spaces, but the article mentions that this is fixed in Crystal Reports XI with a newer version of u2ftext.dll to version 11.0.0.941.
    [1218375 - Trailing spaces ignored when exporting to Text format|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313338333333373335%7D.do]
    I'm using Crystal Reports XI R2 and my u2ftext.dll version is already 11.5.11.1470.
    I'm I missing something or is there another solution to the issue in XI R2?
    Thanks,
    Jeff

    2 Years, multiple people are asking this question.......Does anyone in support have a response for keeping the trailing spaces intact during export?

  • Retrieve All records and display in Report using CAML query in Report Builder if Parameter value is blank

    Hello Experts,
    i have created a report where i have one parameter field where user will pass parameter(e.g. EmpId). As per parameter record will fetched to report if no parameter is passed then it will display all records. I have done it by taking SqlServer Database as datasource.
    by using Following method
    Now i would like to do it by taking Sharepoint List as Datasource. For that what would be the CAML Query.
    Here is my existing CAML query.
    <RSSharePointList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <ListName>Employees</ListName>
      <ViewFields>
        <FieldRef Name="Title" />
        <FieldRef Name="FirstName" />
        <FieldRef Name="LastName" />
        <FieldRef Name="FullName" />
        <FieldRef Name="UserName" />
        <FieldRef Name="Company" />
      </ViewFields>
      <Query>
        <Where>  
    <Eq> 
        <FieldRef Name="Title" />
      <Value Type="Text">    
       <Parameter Name="EmployeeId"/>    
    </Value>
    </Eq>                  
        </Where>
      </Query>
    </RSSharePointList>
    The above code is working if i am passing an employeeId to Parameter. If nothing is passed, it is Not retrieving any record.
    Please suggest
    Thank you
    saroj
    saroj

    Your problem follows the well-established pattern of using an "All" parameter filter in SSRS. There are a few approaches depending on the size of your data. The easiest one is to return all data from CAML and then filter it within SSRS, the following thread
    provides some examples,
    http://stackoverflow.com/questions/18203317/show-all-records-some-records-based-on-parameter-value.
    Other options include passing all of the possible values within the CAML query when "All" is selected, using multiple Report Files to distinguish between both CAML queries, or to use multiple datasets with some logic to show/hide the correct one.
    Dimitri Ayrapetov (MCSE: SharePoint)

  • I want to remove Trailing zeros from a charecter value

    Hello ,
              i want to remove trailing zeros for a prticular value.Following is my code :
    DATA: V_FLOAT TYPE F VALUE '4.8240000000000000E+03',
               V_CHAR(25) ,
               P10_4(10) TYPE P DECIMALS 4.
    CALL FUNCTION 'CEVA_CONVERT_FLOAT_TO_CHAR'
    EXPORTING
    FLOAT_IMP = V_FLOAT
    FORMAT_IMP = P10_4
    ROUND_IMP = ' '
    IMPORTING
    CHAR_EXP = V_CHAR.
    SHIFT V_CHAR RIGHT DELETING TRAILING '0'.
    WRITE : V_CHAR ."NO-ZERO.
    <u><b>Output:</b></u>
    if we pass the value '1.3000000000000000E+01' it should be 13.0
    ex2: '1.3400000000000000E+01' it should be 13.4
    ex3:'4.8240000000000000E+03' it should be 4824
    is there any way to get the solution without functional module. If so Please tell me with code.

    hi
    u can do it in number of ways.
    Use TCODE SU3
    Select default tab and select radio button 123467.89 in decimal notation and save it.
    or u can try :
    if you want to do this through ABAP program.
    1. to delete trailing spaces.
    SHIFT <V_VARIABLE> RIGHT DELETING TRAILING '0'.
    to delete leading zeroes,
    SHIFT <VARIABLE_NAME> LEFT DELETING LEADING '0'.
    only for one abap program, u can use set country command
    for all programs :
    sap menu>system->go to user profil->own data>default --> and choose ur format.
    hope this helps u.
    Regards,
    Prasanth
    Reward all hepful replies

Maybe you are looking for

  • Having trouble setting up time machine.

    I'm trying to set up time machine and I go to the program, click it on, and then I click "choose backup disk", but there is nothing there. Is there anything I am supposed to do beforehand to give Time Machine a backup disk to save in? My next questio

  • Can't process multiple files on one of three catalogs

    After getting straightened out about getting my catalogs in order, which I've done, I've run into another problem. I have three catalogs one for People, one for Things and one I call Workplace where I try out things that are new to me so I don't mess

  • CRM Grants Management - Grantor Implementation

    Hi We need implement CRM Grantor Management for grantors.  We have actually the following sap systems and components: 1.SAP CRM 2007 u2013 CRM Application Server ABAP  Component Version:   SAP CRM 6.0 2.SAP ENH PACK 4 FOR SAP ERP 6.0 u2013 Public Sec

  • I highly doubt there's a solution besides buying a new one, but.......

    I have an 80 GB classic. I've had it for about eight months, and before that I had a 60 GB video for 3 years. My iPod is used in my daily routine (going to work, at my desk at work, going home, 5 days a week, so obviously I try to take care of it. I

  • Add new topic in survey list

    Hello, How to add new topic/survey topic in survey list keeping previous one. And how to display survey list as a web part on a page. Thanking you in advance. Regards, Jayashri