Dbms_xslprocessor problems in PL/SQL

Hi all :)
-- This is a cross-posting of a question I placed on the XMLDB forum, but there seems to be more activity here
-- Sorry about the duplicate
I was wondering if anyone has any ideas about this problem I'm having:
When using the dbms_xslprocessor in PL/SQL, I consistently get dropped connections when trying to either transform a document, or search a document via XPath. So, for instance, if I call dbms_xslprocessor.selectSingleNode('XPATH'), the connection will drop out with the following error (I'm calling a stored procedure here):
ERROR at line 1:
ORA-03113: end-of-file on communication channel
Similar problems happen on XMLType.transform(stylesheet).
I've only managed to have this happen when transforming or searching documents that are not in the default (i.e., xmlns="") namespace, but I can't get rid of the namespace (too much other code is relying on it being there).
What's even stranger is that the XSLPROCESSOR package works, but DBMS_XSLPROCESSOR package does not. Unfortunately, the XSLPROCESSOR package doesn't seem to handle namespaces well, and inserts seemingly random namespace declarations in the transformation results (for instance, on the root element, it puts in "xmlns:xmlns='http://www.w3.org/2000/xmlns/'") or redeclares namespaces on nodes that already have that namespace defined for them by their parents. Namespace prefixes, too.
I should mention that I'm absolutely sure the stylesheet is correct. External processors like MSXML and Xalan produce correct results.
Does anybody have any ideas as to what this might be?
Thanks in advance,
Constantine

what version of the XDK are you using ?
Version of the javaparser ?

Similar Messages

  • Problem in starting SQL*PLUS in oracle database 10g

    Hi
    Well I am facing one problem while starting SQL*PLUS in oracle database 10g
    ERROR - "Procedure entry point longjmp could not be located in dynamic link library orauts.dll"
    This has happened when I installed Oracle Database 11g on same machine and when I deinstalled Oracle 11g then SQL*PLUS is started...no error came
    Can anybody tell me the reason please...

    hi
    pls im having the same problem but in my own case i installed oracle apex using 11g.
    im env variable is:
    C:\Oracle\product\10.1.0\Client_1\bin;C:\Oracle\product\10.1.0\Client_1\jre\1.4.2\bin\client;C:\Oracle\product\10.1.0\Client_1\jre\1.4.2\bin;C:\app\Xty\product\11.2.0\dbhome_1\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\
    pls which is my apex_home so i can interchange it?
    i also have oracle 10g client installed

  • Problems with PL/SQL packages

    Hello,
    I face the following problem with PL/SQL stored procedures. The Oracle
    version is 8.0.5 on Windows NT 4. The PL/SQL package has a set of procedures and functions.
    The main procedure of the PL/SQL package is triggered from VC++ executable. If for some reason,
    an exception is caught in the stored procedure (like no_data_found
    exception), then the following problem occurs.
    If we try to trigger the stored procedure again through the VC++ executable,
    the variables in the stored procedures have the values as in the previous
    execution. They are not getting initialised. (The same database connection
    is used in VC++ executable).
    Currently, only if a new connection to the database is used , the problem is
    solved.
    Also, change in the input parameters of the procedure is not reflected, once the procedure fails because of any exception. Only the input which was given during the time of execution when the procedure failed,is considered.
    What could be the reason for this problem and how can this be corrected?
    Please send in your suggestions.
    Thanks and Regards,
    Ramya Priya
    null

    Hi Keith,
    I am connecting to the database as the package owner..
    I have noticed earlier that I have problems when capturing triggers also.. The content of one large trigger contains 36371 characters and when capturing it from DB, the content was truncated to 28020 characters in Designer.
    Our ideas with capturing the DB packages/procedures were to use the Designer as version control system.
    We wanted to have all objects used in a project in Designer.. entities, tables, triggers, packages, procedures, Forms files, etc. in order to make a configuration for a project release.
    Thank you,
    Claudia

  • How to avoid performance problems in PL/SQL?

    How to avoid performance problems in PL/SQL?
    As per my knowledge, below some points to avoid performance proble in PL/SQL.
    Is there other point to avoid performance problems?
    1. Use FORALL instead of FOR, and use BULK COLLECT to avoid looping many times.
    2. EXECUTE IMMEDIATE is faster than DBMS_SQL
    3. Use NOCOPY for OUT and IN OUT if the original value need not be retained. Overhead of keeping a copy of OUT is avoided.

    Susil Kumar Nagarajan wrote:
    1. Group no of functions or procedures into a PACKAGEPutting related functions and procedures into packages is useful from a code organization standpoint. It has nothing whatsoever to do with performance.
    2. Good to use collections in place of cursors that do DML operations on large set of recordsBut using SQL is more efficient than using PL/SQL with bulk collects.
    4. Optimize SQL statements if they need to
    -> Avoid using IN, NOT IN conditions or those cause full table scans in queriesThat is not true.
    -> See to queries they use Indexes properly , sometimes Leading index column is missed out that cause performance overheadAssuming "properly" implies that it is entirely possible that a table scan is more efficient than using an index.
    5. use Oracle HINTS if query can't be further tuned and hints can considerably help youHints should be used only as a last resort. It is almost certainly the case that if you can use a hint that forces a particular plan to improve performance that there is some problem in the underlying statistics that should be fixed in order to resolve issues with many queries rather than just the one you're looking at.
    Justin

  • Is there any known problem using Oracle SQL Developer 3.0.04 with Java 1.7?

    I'm new to Oracle. I have installed Oracle SQL Developer 3.0.04 and Java 1.7. When I run Oracle SQL Developer, I will get the window Running this product is supported with minimum Java version of 1.6.0_04 and a maximum version less than 1.7. This product will not be supported....
    Is there any known problem using Oracle SQL Developer 3.0.04 with Java 1.7?
    I have already downloaded Java 1.6 but don't know whether I need to uninstall Java 1.7 first. If don't need to uninstall Java 1.7, how can I set Oracle SQL Developer to run with Java 1.6?
    Thanks for any help.
    Edited by: 881656 on Aug 25, 2011 11:22 AM

    Hi,
    One prior post discussing the use of Java 7 is:
    SQL Developer 3.0  and Java SE 7?
    There is no need to uninstall any Java version (except if you have disk space constraints) and no problem switching between Java versions. This may be controlled in the sqldeveloper.conf file in your ...\sqldeveloper\sqldeveloper\bin directory via the SetJavaHome line. For example:
    #SetJavaHome ../../jdk
    SetJavaHome C:/Program Files/Java/jdk1.6.0_26
    #SetJavaHome C:/Program Files/Java/jdk1.7.0Regards,
    Gary Graham
    SQL Developer Team

  • Problems on installation SQL Server Express

    I have problems installation of SQL server express.
    Here is the error message:
    TITLE: SQL Server Setup failure.
    SQL Server Setup has encountered the following error:
    '.', hexadecimal value 0x00, is an invalid character. Line 1, position 52351.
    Error code 0x84B10001.

    Have a look at this link.
    http://stackoverflow.com/questions/21643363/error-0x84b10001-when-installing-sql-server-2012-on-a-machine-with-vs2013
    ==
    Well, turns out that this cryptic error is due to an older
    instance of SQL Server Desktop Engine (MSDE) being present.
    After uninstalling MSDE, the SQL Server 2012 setup worked without errors.
    ==
    Satheesh
    My Blog | How to ask questions in technical forum

  • Dbms_xslprocessor package problems in PL/SQL

    Hi all :)
    I was wondering if anyone has any ideas about this problem I'm having:
    When using the dbms_xslprocessor in PL/SQL, I consistently get dropped connections when trying to either transform a document, or search a document via XPath. So, for instance, if I call dbms_xslprocessor.selectSingleNode('XPATH'), the connection will drop out with the following error (I'm calling a stored procedure here):
    ERROR at line 1:
    ORA-03113: end-of-file on communication channel
    Similar problems happen on XMLType.transform(stylesheet).
    I've only managed to have this happen when transforming or searching documents that are not in the default (i.e., xmlns="") namespace, but I can't get rid of the namespace (too much other code is relying on it being there).
    What's even stranger is that the XSLPROCESSOR package works, but DBMS_XSLPROCESSOR package does not. Unfortunately, the XSLPROCESSOR package doesn't seem to handle namespaces well, and inserts seemingly random namespace declarations in the transformation results (for instance, on the root element, it puts in "xmlns:xmlns='http://www.w3.org/2000/xmlns/'") or redeclares namespaces on nodes that already have that namespace defined for them by their parents. Namespace prefixes, too.
    Does anybody have any ideas as to what this might be?
    Thanks in advance,
    Constantine

    I should also mention that I'm ABSOLUTELY sure that the stylesheets I'm using for transformation are correct as of XSLT ver. 1.0 -- multiple external processors (Xalan and MSXML, specifically) give the correct result on the same stylesheet.

  • Problem with extended SQL functions in RTF Template

    Hello,
    I'm new to BI Publisher and I'm trying to create a new rtf template. I've created my layout and added fields without any problems, but I'm having trouble trying to insert calculations such as add,substract,multiply,divide, etc.
    Here is an example of what I'm trying to do:
    <?xdofx:STAFF_ASMT+100?>
    Where STAFF_ASMT is one of my fields. When I add this function all I get is the actual value from that field returned on the first page, and then on other pages I get the value plus an extra zero.
    So with my example data below I get: 6600 on page 1 and 51830 on page 2. Any ideas on what I'm doing wrong or if it is possible to do what I'm doing? Also, is it possible to add/substract/multiple two or more fields together?
    Something like this: <?xdofx:STAFF_ASMT+GROSS_INV?>
    I was going to add all of these functions to my SQL statement, but I have 30 or so calculations I want to perform in the layout and I don't want to have to write that all out in SQL.
    <ROWSET>
    <ROW>
    <STAFF_ASMT>6600</STAFF_ASMT>
    <GROSS_INV>0</GROSS_INV>
    </ROW>
    <ROW>
    <STAFF_ASMT>5183</STAFF_ASMT>
    <GROSS_INV>0</GROSS_INV>
    </ROW>
    </ROWSET>
    Thanks for your help

    When I tried that I get the following error message when I click the Validate Template option:
    [080609_031631893][][ERROR] [Line 162.184] Incorrect XPath: +
    And when I try to generate a PDF preview I get:
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at oracle.apps.xdo.common.xml.XSLT10gR1.invokeNewXSLStylesheet(Unknown Source)
         at oracle.apps.xdo.common.xml.XSLT10gR1.transform(Unknown Source)
         at oracle.apps.xdo.common.xml.XSLTWrapper.transform(Unknown Source)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(Unknown Source)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(Unknown Source)
         at oracle.apps.xdo.template.FOProcessor.createFO(Unknown Source)
         at oracle.apps.xdo.template.FOProcessor.generate(Unknown Source)
         at RTF2PDF.runRTFto(RTF2PDF.java:629)
         at RTF2PDF.runXDO(RTF2PDF.java:439)
         at RTF2PDF.main(RTF2PDF.java:289)
    Caused by: oracle.xdo.parser.v2.XPathException: Error in expression: './/+'.
         at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:806)
         at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:571)

  • Problem with java.sql.Clob and oracle.sql.CLOB

    Hi,
    I am using oracle9i and SAP web application server. I am getClob method and storing that in java.sql.Clob and using the getClass().getName() I am getting the class name as oracle.sql.CLOB. But when I am trying to cast this to oracle.sql.CLOB i am getting ClassCastException. The code is given below
    java.sql.Clob lOracleClob = lResultSet.getClob(lColIndex + 1);
    lPrintWriter = new PrintWriter(new BufferedWriter (((oracle.sql.CLOB) lOracleClob).getCharacterOutputStream()));
    lResourceStatus = true;
    can anybody please tell me the what is the problem with this and solution.
    thanks,
    Ashok.

    Hi Ashok
    You can get a "ClassCastException" when the JVM doesn't have access to the specific class (in your case, "oracle.sql.CLOB").
    Just check your classpath and see if you are referring to the correct jar files.
    cheers
    Sameer
    PS: Please award points if you find the answer useful

  • Problem with the SQL Data Source (Essbase server in Unix Env)

    I too have the same problem.
    I have setup the Datasource for an Oracle db in the Essbase Server (which is on a Unix Box) using the Oracle Wire Protocol.I tested the ODBC connection in the Server and it connect with the credentials.
    But if i choose the same DSN in the EAS and try to connect i get the below error
    Error: 1021001 Failed to Establish Connection With SQL Database Server.
    I even downloaded a document from the Oracle site.. on the SQL interface in Essbase but i could not find the inst-sql.sh file to enable Essbase SQL Interface on the server. Is this required??
    I tried with both the User & System DSN on the server but no luck.
    Any help on this will be highly appreciated. Thanks in advance.
    Posting in a new thread since the old one is answered and no points available to score.

    It can depend on the version, it is different for version 11, further information :- How to define a relational data source in (odbc.ini) V11 Essbase?
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Problem in connecting SQL developer to Oracle database

    Hi,I don't know this is the correct forum for my problem
    I Just installed   Oracle Sql developer 3.2.I encountered a problem while creating a new connection with Oracle database 11g..
    The error message says "Status : Failure -Test failed: The Network Adapter could not establish the connection"..
    The command response as follows
    lsnrctl stop
    LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 31-OCT-2013 21:52
    :56
    Copyright (c) 1991, 2010, Oracle.  All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
    TNS-01190: The user is not authorized to execute the requested listener command
    lsnrctl start
    LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 31-OCT-2013 21:55
    :49
    Copyright (c) 1991, 2010, Oracle.  All rights reserved.
    TNS-01106: Listener using listener name LISTENER has already been started
    lsnrctl status
    LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 31-OCT-2013 21:57
    :07
    Copyright (c) 1991, 2010, Oracle.  All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
    STATUS of the LISTENER
    Alias                     LISTENER
    Version                   TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Produ
    ction
    Start Date                31-OCT-2013 20:57:07
    Uptime                    0 days 1 hr. 0 min. 0 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Parameter File   C:\app\RIYAS\product\11.2.0\dbhome_1\network\admin\lis
    tener.ora
    Listener Log File         c:\app\riyas\diag\tnslsnr\RIYAS-PC\listener\alert\log.
    xml
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
    Services Summary...
    Service "CLRExtProc" has 1 instance(s).
      Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "orcl" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
    Service "orclXDB" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
    The command completed successfully
    lsnrctl service
    LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 31-OCT-2013 21:58
    :28
    Copyright (c) 1991, 2010, Oracle.  All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
    Services Summary...
    Service "CLRExtProc" has 1 instance(s).
      Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
        Handler(s):
          "DEDICATED" established:0 refused:0
             LOCAL SERVER
    Service "orcl" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
        Handler(s):
          "DEDICATED" established:102 refused:0 state:ready
             LOCAL SERVER
    Service "orclXDB" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
        Handler(s):
          "D000" established:0 refused:0 current:0 max:1022 state:ready
             DISPATCHER <machine: RIYAS-PC, pid: 1828>
             (ADDRESS=(PROTOCOL=tcp)(HOST=RIYAS-PC)(PORT=49911))
    The command completed successfully
    set
    ALLUSERSPROFILE=C:\ProgramData
    APPDATA=C:\Users\RIYAS\AppData\Roaming
    CommonProgramFiles=C:\Program Files\Common Files
    CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
    CommonProgramW6432=C:\Program Files\Common Files
    COMPUTERNAME=RIYAS-PC
    ComSpec=C:\windows\system32\cmd.exe
    FP_NO_HOST_CHECK=NO
    HOMEDRIVE=C:
    HOMEPATH=\Users\RIYAS
    LOCALAPPDATA=C:\Users\RIYAS\AppData\Local
    LOGONSERVER=\\RIYAS-PC
    NUMBER_OF_PROCESSORS=4
    OS=Windows_NT
    Path=C:\app\RIYAS\product\11.2.0\dbhome_1\bin;C:\app\RIYAS\product\11.2.0\dbhome
    _2\bin;C:\Program Files (x86)\PC Connectivity Solution\;C:\Program Files\Common
    Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsof
    t Shared\Windows Live;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\
    Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\wi
    ndows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPo
    werShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;
    C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program File
    s (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\I
    ntel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Open
    CL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Progra
    m Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\P
    rogram Files (x86)\Windows Live\Shared
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
    PROCESSOR_ARCHITECTURE=AMD64
    PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
    PROCESSOR_LEVEL=6
    PROCESSOR_REVISION=3a09
    ProgramData=C:\ProgramData
    ProgramFiles=C:\Program Files
    ProgramFiles(x86)=C:\Program Files (x86)
    ProgramW6432=C:\Program Files
    PROMPT=$P$G
    PSModulePath=C:\windows\system32\WindowsPowerShell\v1.0\Modules\
    PUBLIC=C:\Users\Public
    SESSIONNAME=Console
    SystemDrive=C:
    SystemRoot=C:\windows
    TEMP=C:\Users\RIYAS\AppData\Local\Temp
    TMP=C:\Users\RIYAS\AppData\Local\Temp
    USERDOMAIN=RIYAS-PC
    USERNAME=RIYAS
    USERPROFILE=C:\Users\RIYAS
    windir=C:\windows
    windows_tracing_flags=3
    windows_tracing_logfile=C:\BVTBin\Tests\installpackage\csilogfile.log
    Pls help..

    You don't say what you have done to set up a connection.
    This error is usually caused by something like using the wrong host name, or port number.

  • Getting problem while installing Sql Server 2012

    I am using Windows 8 in my system. I am trying to install Sql Server 2012 in my system .
    But i am getting following error in the final.
    The required MSI package 'D:\SQL Server 2012\x86\setup\sql_engine_core_shared_msi' doesn't exist.
    Please, help me quickly.

    Hi,
    You post same question 3 times. Please avoid this practice on Forum, I 
    have merged the same thread  into this thread . Thanks for your understanding.
    In addition, as other post, you can copy the missing .msi file from the complete and unbroken installation media to your MSI package path. Then run as administrator again. And also check if your account has read and write permission for your installation
    media saving path. If the error still exists, you can check the SQL setup logs (Detail.txt and summary.txt) for analysis.
    There is similar issue about installing SQL Server failed due to miss the required MSI package.
    http://social.msdn.microsoft.com/Forums/en-US/2aa6136b-9ccd-4c97-a6d3-cbe408c38228/sql-server-2008-service-pack-1-installation-problem
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Problem writing a sql query for a select list based on a static LOV

    Hi,
    I have the following table...
    VALIDATIONS
    ID          Number     (PK)
    APP_ID          Number     
    REQUESTED     Date          
    APPROVED     Date          
    VALID_TIL     Date
    DEPT_ID          Number     (FK)
    I have a search form with the following field item variables...
    P11_DEPT_ID (select list based on dynamic LOV from depts table)
    P11_VALID (select list based on static Yes/No LOV)
    A report on the columns of the Validations table is shown based on the values in the search form. So far, my sql query for the report is...
    SELECT v.APP_ID,
    v.REQUESTED,
    v.APPROVED,
    v.VALID_TIL,
    d.DEPT
    FROM DEPTS d, VALIDATIONS v
    WHERE d.DEPT_ID = v.DEPT_ID(+)
    AND (d.DEPT_ID = :P11_DEPT_ID OR :P11_DEPT_ID = -1)
    This query works so far. My problem is that I don't know how to do a search based on the P11_VALID item - if 'yes' is selected, then the VALID_TIL date is still valid. If 'no' is selected then the VALID_TIL date has passed.
    Can anyone help me to extend my query to include this situation?
    Thanks.

    Hello !
    Let's have a look at my example:create table test
    id        number
    ,valid_til date
    insert into test values( 1, sysdate-3 );
    insert into test values( 2, sysdate-2 );
    insert into test values( 3, sysdate-1 );
    insert into test values( 4, sysdate );
    insert into test values( 5, sysdate+1 );
    insert into test values( 6, sysdate+2 );
    commit;
    select * from test;
    def til=yes
    select *
      from test
      where decode(sign(trunc(valid_til)-trunc(sysdate)),1,1,0,1,-1)
           =decode('&til','yes',1,-1);
    def til=no
    select *                                                                               
      from test                                                                            
      where decode(sign(trunc(valid_til)-trunc(sysdate)),1,1,0,1,-1)
           =decode('&til','yes',1,-1);  
    drop table test;  It's working fine, I've tested it.
    The above changes to my first idea I did because of time portion of the DATE datatype in Oracle and therefore the wrong result for today.
    For understandings:
    1.) TRUNC removes the time part of DATE
    2.) The difference of to date-values is the number of days between.
    3.) SIGN is the mathematical function and gives -1,0 or +1 according to an negative, zero or positiv argument.
    4.) DECODE is like an IF.
    Inspect your LOV for the returning values. According to my example they shoul be 'yes' and 'no'. If your values are different, you may have to modify the DECODE.
    Good luck,
    Heinz

  • Problem Writing java.sql.Date to MS Access

    I have a relatively simple application that is for my own use (not distributed on an enterprise-wide basis). As I don't have an IT staff, I'm using a rudimentary Java front-end (v1.3.1) and a Microsoft Access backend.
    I seem to have trouble using INSERT/UPDATE statements with the MS Access Date/Time data type. Below is an example of code being used (id is defined as Text, amount is a Number and timestamp is Date/Time):
    conn = DriverManager.getConnection("jdbc:odbc:markets", "", "");
    conn.setAutoCommit(true);
    String sql = "INSERT INTO temp (id, amount, timestamp) VALUES (?, ?, ?)";
    PreparedStatement stmt = conn.prepareStatement(sql);
    String id = args[0];
    int len = id.length();
    java.sql.Date dt = new java.sql.Date(new java.util.Date().getTime());
    stmt.setString(1, id);
    stmt.setDouble(2, id.length());
    // I think the problem is here - the JDBC driver doesn't properly map dates to Access???
    stmt.setDate(3, dt);
    stmt.execute();
    stmt.close();
    conn.close();And I get the following error:
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access
    Driver] Syntax error in INSERT INTO statement.
            at sun.jdbc.odbc.JdbcOdbc.createSQLException (JdbcOdbc.java:6879)
            at sun.jdbc.odbc.JdbcOdbc.standardError (JdbcOdbc.java:7036)
            at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect (JdbcOdbc.java:3065)
            at sun.jdbc.odbc.JdbcOdbcStatement.execute (JdbcOdbcStatement.java:338)
            at TestWritingDate.main(TestWritingDate.java:31) I'm virtually certain this is a translation problem with
    the java.sql.Date and the JDBC driver. But I can't seem
    to overcome this. Any help is DESPERATELY needed.
    Thanks.
    Matt

    That was it....thanks...didn't even consider that....perhaps I should start using class names that are already in use too :-). Thanks again...

  • Dg4odbc, unixODBC, freeTDS - connection problems to MS SQL 2008

    I am trying to set up a database link between my 64bit Oracle 11g running on CentOS 6.2 and my MS SQL 2008 server running on MS Windows server 2003. I have installed the following -
    freeTDS - version 0.91 (64 bit)
    unixODBC - version 2.3.1 (64 bit)
    I have successfully configured ODBC and freeTDS so that I can connect using isql and query my MSSQL database. The problem I am having is connecting Oracle to MSSQL, I am sure it is a simple configuration error but I have been going round in circles with this and hope someone can help!
    freetds.conf
    [global]
    timeout = 10
    connect timeout = 10
    text size = 64512
    [CERM]
    host = 192.168.xxx.xxx
    port = 1101
    tds version = 7.2
    instance = SSLSQLDB
    dump file = /tmp/dump.log
    odbc.ini
    [ODBC Data Sources]
    CERM=TDS connection
    [CERM]
    Servername = CERM
    Description = TDS connection
    Driver = /usr/local/lib/libtdsodbc.so
    UsageCount = 1
    FileUsage = 1
    [ODBC]
    Trace=255
    odbcinst.ini
    [TDS]
    Description = FreeTDS driver for MS SQL
    Driver = /usr/local/lib/libtdsodbc.so
    Setup = /usr/lib64/libtdsS.so
    Trace = Yes
    TraceFile = /tmp/freetd.log
    FileUsage = 1
    [FreeTDS]
    Description = FreeTDS driver for MS SQL
    Driver = /usr/local/lib/libtdsodbc.so
    Setup = /usr/lib64/libtdsS.so
    Trace = Yes
    TraceFile = /tmp/freetd.log
    FileUsage = 1
    (Because I have put the actual path to the driver in the odbc.ini file I don;t believe the odbcinst.ini file is actually used)
    inithscerm.ora
    # This is a sample agent init file containing the HS parameters that
    # are needed for an ODBC Agent.
    # HS init parameters
    HS_FDS_CONNECT_INFO=CERM
    HS_FDS_TRACE_LEVEL=255
    #HS_FDS_TRACE_FILE_NAME = /tmp/hsodbcsql.trc
    HS_FDS_SHAREABLE_NAME=/usr/local/lib/libodbc.so
    HS_FDS_SUPPORT_STATISTICS=FALSE
    set ODBCINI=/usr/local/etc/odbc.ini
    (my odbc.ini file is located in /usr/local/etc)
    listener.ora
    # listener.ora Network Configuration File: /usr/oracle/product/network/admin/listener.ora
    # Generated by Oracle configuration tools.
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = ssl-oracle.domain)(PORT = 1521))
    ADR_BASE_LISTENER = /usr/oracle
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC=
    (SID_NAME=hscerm)
    (ORACLE_HOME=/usr/oracle/product)
    (PROGRAM=dg4odbc)
    (ENVS=LD_LIBRARY_PATH = /usr/local/lib:$ORACLE_HOME/lib)
    (SID_DESC=
    (SID_NAME=PROD)
    (ORACLE_HOME=/usr/oracle/product)
    tnsnames.ora
    # tnsnames.ora Network Configuration File: /usr/oracle/product/network/admin/tnsnames.ora
    # Generated by Oracle configuration tools.
    PROD =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ssl-oracle.domain)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = PROD.DOMAIN)
    hscerm=
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=TCP)(HOST=ssl-oracle.domain)(PORT=1521))
    (CONNECT_DATA= (SID=hscerm))
    (HS=OK)
    right - I can tnsping my hscerm instance and that returns ok so I'm fairly sure the configuration is fine for both tnsnames.ora and listener.ora. I can isql connect to the ODBC defined name for the the MSSQL database. but when I create a database link in Oracle and then test it I get the following trace output :-
    [ODBC][14030][1339512618.356535][SQLSetConnectAttrW.c][332]
    Entry:
    Connection = 0x2054640
    Attribute = SQL_ATTR_AUTOCOMMIT
    Value = (nil)
    StrLen = -5
    [ODBC][14030][1339512618.356616][SQLSetConnectAttrW.c][616]
    Exit:[SQL_SUCCESS]
    [ODBC][14030][1339512618.356984][SQLDriverConnectW.c][290]
    Entry:
    Connection = 0x2054640
    Window Hdl = (nil)
    Str In = [DNCR;I=APDagj20][length = 30]
    Str Out = 0x2053408
    Str Out Max = 1024
    Str Out Ptr = 0x7fff6d305770
    Completion = 0
    [ODBC][14030][1339512618.357030][SQLDriverConnectW.c][500]Error: IM002
    [ODBC][14030][1339512618.357115][SQLGetDiagRecW.c][508]
    Entry:
    Connection = 0x2054640
    Rec Number = 1
    SQLState = 0x7fff6d3053d0
    Native = 0x7fff6d3051c4
    Message Text = 0x7fff6d3051d0
    Buffer Length = 510
    Text Len Ptr = 0x7fff6d305420
    [ODBC][14030][1339512618.357153][SQLGetDiagRecW.c][550]
    Exit:[SQL_SUCCESS]
    SQLState = IM002
    Native = 0x7fff6d3051c4 -> 0
    Message Text = [[unixODBC][Driver Manager]Data source name not found, and no default driver specified]
    [ODBC][14030][1339512618.357197][SQLGetDiagRecW.c][508]
    Entry:
    Connection = 0x2054640
    Rec Number = 2
    SQLState = 0x7fff6d3053d0
    Native = 0x7fff6d3051c4
    Message Text = 0x7fff6d3051d0
    Buffer Length = 510
    Text Len Ptr = 0x7fff6d305420
    [ODBC][14030][1339512618.357228][SQLGetDiagRecW.c][550]
    Exit:[SQL_NO_DATA]
    [ODBC][14030][1339512618.357291][SQLDisconnect.c][208]
    Entry:
    Connection = 0x2054640
    [ODBC][14030][1339512618.357321][SQLDisconnect.c][237]Error: 08003
    [ODBC][14030][1339512618.357387][SQLFreeHandle.c][284]
    Entry:
    Handle Type = 2
    Input Handle = 0x2054640
    Now I can clearly see the error "Data source name not found, and no default driver specified" which according to all the documentation means that the entry HS_FDS_CONNECT_INFO=CERM does not match the entry in my odbc.ini file ([CERM]) but for the life of me I can;t see why they don;t match ??
    Any help greatly received.

    Yeah I verified with isql but I have changed the odbc.ini file as you suggested -
    [root@ssl-oracle ~]# more /usr/local/etc/odbc.ini
    [ODBC Data Sources]
    CERM=TDS connection
    [CERM]
    Server = 192.168.xxx.xxx
    Driver = /usr/local/lib/libtdsodbc.so
    Database = sqlb00
    Port = 1101
    TDS_Version = 8.0
    QuotedId = YES
    [ODBC]
    Trace=255
    [root@ssl-oracle admin]# more inithscerm.ora
    # This is a sample agent init file containing the HS parameters that
    # are needed for an ODBC Agent.
    # HS init parameters
    HS_FDS_CONNECT_INFO=CERM
    HS_FDS_TRACE_LEVEL=255
    #HS_FDS_TRACE_FILE_NAME = /tmp/hsodbcsql.trc
    HS_FDS_SHAREABLE_NAME=/usr/local/lib/libodbc.so
    HS_FDS_SUPPORT_STATISTICS=FALSE
    HS_LANGUAGE=american_america.we8mswin1252
    HS_NLS_NCHAR=UCS2
    set ODBCINI=/usr/local/etc/odbc.ini
    [root@ssl-oracle admin]# osql -S CERM -U sa -P supersecretpassword
    checking shared odbc libraries linked to isql for default directories...
    trying /tmp/sql ... no
    trying /tmp/sql ... no
    trying /usr/loc ... no
    trying /tmp/sql.log ... no
    trying /home ... no
    trying /.odbc.ini ... no
    trying /usr/local/etc ... OK
    checking odbc.ini files
    cannot read "/root/.odbc.ini"
    reading /usr/local/etc/odbc.ini
    [CERM] found in /usr/local/etc/odbc.ini
    found this section:
    [CERM]
    Server = 192.168.xxx.xxx
    Driver = /usr/local/lib/libtdsodbc.so
    Database = sqlb00
    Port = 1101
    TDS_Version = 8.0
    QuotedId = YES
    looking for driver for DSN [CERM] in /usr/local/etc/odbc.ini
    found driver line: " Driver = /usr/local/lib/libtdsodbc.so"
    driver "/usr/local/lib/libtdsodbc.so" found for [CERM] in odbc.ini
    found driver named "/usr/local/lib/libtdsodbc.so"
    /usr/local/lib/libtdsodbc.so is an executable file
    "Server" found, not using freetds.conf
    Server is "192.168.xxx.xxx"
    looking up hostname for ip address 192.168.xxx.xxx
    Configuration looks OK. Connection details:
    DSN: CERM
    odbc.ini: /usr/local/etc/odbc.ini
    Driver: /usr/local/lib/libtdsodbc.so
    Server hostname: ssl-database.domain
    Address: 192.168.xxx.xxx
    Attempting connection as sa ...
    + isql CERM sa supersecretpassword -v
    | Connected! |
    | |
    | sql-statement |
    | help [tablename] |
    | quit |
    | |
    SQL>
    sql.log
    [ODBC][31473][1339581606.488571][SQLSetConnectAttr.c][396]
    Entry:
    Connection = 0x26c2a30
    Attribute = SQL_ATTR_AUTOCOMMIT
    Value = (nil)
    StrLen = -5
    [ODBC][31473][1339581606.488638][SQLSetConnectAttr.c][681]
    Exit:[SQL_SUCCESS]
    [ODBC][31473][1339581606.488924][SQLDriverConnect.c][726]
    Entry:
    Connection = 0x26c2a30
    Window Hdl = (nil)
    Str In = [DSN=CERM;UID=SA;PWD=**********][length = 30]
    Str Out = 0x26c4b18
    Str Out Max = 1024
    Str Out Ptr = 0x7fff12846560
    Completion = 0
    UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE'
    DIAG [01000] [FreeTDS][SQL Server]Unknown host machine name.
    DIAG [08001] [FreeTDS][SQL Server]Unable to connect to data source
    [ODBC][31473][1339581606.491276][SQLDriverConnect.c][1353]
    Exit:[SQL_ERROR]
    [ODBC][31473][1339581606.491358][SQLGetDiagRec.c][680]
    Entry:
    Connection = 0x26c2a30
    Rec Number = 1
    SQLState = 0x7fff128461c0
    Native = 0x7fff12845fb4
    Message Text = 0x7fff12845fc0
    Buffer Length = 510
    Text Len Ptr = 0x7fff12846210
    [ODBC][31473][1339581606.491395][SQLGetDiagRec.c][717]
    Exit:[SQL_SUCCESS]
    SQLState = 08001
    Native = 0x7fff12845fb4 -> 0
    Message Text = [[unixODBC][FreeTDS][SQL Server]Unable to connect to data source]
    [ODBC][31473][1339581606.491442][SQLGetDiagRec.c][680]
    Entry:
    Connection = 0x26c2a30
    Rec Number = 2
    SQLState = 0x7fff128461c0
    Native = 0x7fff12845fb4
    Message Text = 0x7fff12845fc0
    Buffer Length = 510
    Text Len Ptr = 0x7fff12846210
    [ODBC][31473][1339581606.491493][SQLGetDiagRec.c][717]
    Exit:[SQL_SUCCESS]
    SQLState = 01000
    Native = 0x7fff12845fb4 -> 20013
    Message Text = [[unixODBC][FreeTDS][SQL Server]Unknown host machine name.]
    [ODBC][31473][1339581606.491528][SQLGetDiagRec.c][680]
    Entry:
    Connection = 0x26c2a30
    Rec Number = 3
    SQLState = 0x7fff128461c0
    Native = 0x7fff12845fb4
    Message Text = 0x7fff12845fc0
    Buffer Length = 510
    Text Len Ptr = 0x7fff12846210
    [ODBC][31473][1339581606.491558][SQLGetDiagRec.c][717]
    Exit:[SQL_NO_DATA]
    [ODBC][31473][1339581606.491623][SQLDisconnect.c][208]
    Entry:
    Connection = 0x26c2a30
    [ODBC][31473][1339581606.491652][SQLDisconnect.c][237]Error: 08003
    [ODBC][31473][1339581606.491719][SQLFreeHandle.c][284]
    Entry:
    Handle Type = 2
    Input Handle = 0x26c2a30
    [ODBC][31473][1339581606.491750][SQLFreeHandle.c][333]
    Exit:[SQL_SUCCESS]
    [ODBC][31473][1339581606.493083][SQLFreeHandle.c][219]
    Entry:
    Handle Type = 1
    Input Handle = 0x26abfe0
    I can also ping both the hostname and ip address of the MSSQL server.

Maybe you are looking for

  • How to send Unicode to Oracle

    Hello, We have an intranet application that is live for sometime now. Our new requirement is to be able to store and view Japanese characters in some of the fields. We have Oracle 9.2.0.5 with NLS_CHARSET as UTF8. Our application server is WebLogic6.

  • Is apple's Mac Mini compatible With only Apple display?

    I was wondering if Mac Mini is compatible With not only apple's thunderbolt display. Please help me, Thanks, janosfromhun

  • HDD has noise like "DADADA"

    sometimes MAC mini has noise and sounds like da da da. HDD gets trouble?

  • WSA RAID Status: Degraded

    Hi,    I Have the next status on WSA RAID Status: Degraded Any idea how to get Optimal ?

  • BAPI_GOODSMVT_CREATE - batch

    hi , Im using BAPI_GOODSMVT_CREATE for stock transfer posting. Here there is a batch field to be passed. what value should we pass here. i checked MCH1 table but it consists of multiple batches for a material. what is the exact way to proceed with th