Append in oracle

Hi all,
I have got two tables in oracle,how can i append two tables? i wantr a new table with both table appended,
can anyone clearly explain me how to use UNION,can anyone of you please explain me using code?
Thanks
Mike.

>
I have got two tables in oracle,how can i append two tables? i wantr a new table with both table appended,
can anyone clearly explain me how to use UNION,can anyone of you please explain me using code?CREATE MyNewTable AS (SELECT * FROM MyOldTable1);
INSERT INTO MyNewTable VALUES( SELECT * FROM MyOldTable2);
Tables must have the same structure.
Of you could try
CREATE MyNewTable AS ((SELECT * FROM MyOldTable1) UNION ALL (SELECT * FROM MyOldTable2))
UNION instead of UNION ALL will eliminate duplicates.
Note. not tested.
HTH.
Paul...
When asking database related questions, please give other posters
some clues, like OS (with version), version of Oracle being used and DDL.
Other trivia such as CPU, RAM + Disk configuration might also be useful.
The exact text and/or number of error messages is useful (!= "it didn't work!"). Thanks.
Furthermore, as a courtesy to those who spend time analysing and attempting to help,
please do not top post and do try to trim your replies!
Mike.

Similar Messages

  • Append in Oracle SQL/DBMS/Procedure

    Hi, I am running a direct SQL statement against a field. When the user enters values into a field, I want the values to be passed into the Oracle 9 database. When the user adds more info into the same field, I want the new info appended to the previous entry.
    So if user enters "Jim" into field A, then the user wants to enter "Jeffrey" -- the SQL statement should append Jim to Jeffrey and store both values.
    Is there an SQL or DBMS statement/procedure which allows me to do this?

    if you are using front end tools such as oracle forms developer. the when-validate-item trigger for the base item is suitable for this scenario. you have to explicitly put the commit keyword on the when-validate-item.

  • Append hint + Oracle Ole DB 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

    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

  • Error while generating a flat file from oracle database

    i have imported three knowledge modules for the interafce.
    LKM SQL to SQL
    IKM SQL to FILE Append
    CKM oracle
    I have tried executing the interface in following ways
    1. checked the staging area different from target and choosed SUNOPSIS_MEMORY_ENGINE. three boxes appeared in the flow but i could not see any of the knowledge modules in the flow and i could not select form the drop down also.
    all the three boxes were showing the error.
    2. checked the staging area different from target and choosed a oracle logical schema. my flow has two boxes.
    For the source i have given LKM SQL to SQL and for target i have given IKM SQL to FILE append
    But the interface is erroring out while creating the load table... the error message is missing parameter
    IS there anything i have to do apart from this

    if your file ouput file has Date field,Numeric field then there is a chance for failure. Try making all the output fields as Varchar2.
    -app

  • How to load data from sysbase to oracle using sysbase odbc drivers??

    Hi ,
    I am trying to create an interface from sysbase to oracle, using LKM sql to orcle and IKM SQL control append, IKM SQL incremental append,CKM oracle . when we are running the interface we are getting below error
    com.sunopsis.sql.SnpsMissingParametersException: Missing parameter: C1_WORKGROUP_ID
    SQL: insert into ODIUSER.C$_0AGENTLOGINLOGOUT (      C1_WORKGROUP_ID,      C2_USER_ID,      C3_CREATEDT,      C4_UPDATEDT,      C5_REASONID,      C6_LOGOUTDT,      C7_LOGINDT,      C8_SERVICE_ID ) values (      :C1_WORKGROUP_ID,      :C2_USER_ID,      :C3_CREATEDT,      :C4_UPDATEDT,      :C5_REASONID,      :C6_LOGOUTDT,      :C7_LOGINDT,      :C8_SERVICE_ID )
         at com.sunopsis.sql.SnpsQuery.completeHostVariable(SnpsQuery.java:439)
         at com.sunopsis.sql.SnpsQuery.updateExecStatement(SnpsQuery.java:1926)
         at com.sunopsis.sql.SnpsQuery.addBatch(SnpsQuery.java:122)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.executeUpdate(SnpSessTaskSql.java:3034)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrders(SnpSessTaskSql.java:729)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java:2815)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2515)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:534)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:449)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1954)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:322)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:224)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:246)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:237)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:794)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:114)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
         at java.lang.Thread.run(Thread.java:619)

    Hi all,
    Can any one help me in doing interface from sysbase to oracle??

  • Issue encountered when Login as sysdba role using Thin Oracle JDBC Driver

    Hello all,
    we are now considering to use Thin oracle JDBC driver to create database in our project, but we met one issue when we tried to connect to oracle as sysdba role using Thin driver, and it throws java.sql.SQLException: Io Exception: SO Exception was generated, I have found some tips on oracle jdbc website and it says :
    How do I connect as SYSDBA or SYSOPER?
    The only way to do this is to use the Properties object when connecting, rather than specifying the username and password as strings. Put the username into the "user" property, and the password into the "password" property. Then, put the mode into the "internal_logon" property. Something like the following:
    Properties props = new Properties();
    props.put("user", "scott");
    props.put("password", "tiger");
    props.put("internal_logon", "sysoper");
    Connection conn = DriverManager.getConnection (url, props);
    When connecting as SYSDBA or SYSOPER using the Thin driver, the RDBMS must be configured to use a password file. See "Creating and Maintaining a Password File" in the "Oracle Database Administrator's Guide".
    So, i did execute orapwd command to create a password file and also set remote_login_passwordfile=execlusive in my initxxx.ora initial parameter file, however, when i tried to connect, it failed.
    private static void createEmsdbDatabase(){
    String url = "jdbc:oracle:thin:@localhost:1521:";
    StringBuffer sqlStatement = new StringBuffer();
    sqlStatement.append("create database xxx");
    sqlStatement.append("maxdatafiles 254 ");
    sqlStatement.append("maxinstances 8 ");
    sqlStatement.append("maxlogfiles 32 ");
    sqlStatement.append("character set UTF8 ");
    sqlStatement.append("national character set UTF8 ");
    sqlStatement.append("DATAFILE 'c:\\oracle\\xxx\\system01.dbf' SIZE 18M REUSE ");
    sqlStatement.append("logfile 'c:\\oracle\\xxx\\redo01.log' SIZE 2M REUSE, ");
    sqlStatement.append("'c:\\oracle\\xxx\\redo02.log' SIZE 2M REUSE, ");
    sqlStatement.append("'c:\\oracle\\xxx\\redo03.log' SIZE 2M REUSE ");
    try {
    DriverManager.registerDriver(new OracleDriver());
    Properties props = new Properties();
    props.put("user", "sys");
    props.put("password", "password");
    props.put("database","xxx");
    props.put("internal_logon", "sysdba");
    Connection conn = DriverManager.getConnection(url, props);
    Statement statement = conn.createStatement();
    statement.executeUpdate(sqlStatement.toString());
    statement.close();
    conn.close();
    } catch (SQLException e) {
    e.printStackTrace();
    But what made me puzzled a lot is if i use OCI driver, it did work great, why??? guys, anybody knows, please give me some tips, thanks in advance.
    regards,
    Kaixuan @ Shanghai

    clarify my question in detail:
    Step 1 : create password file using orapwd command
    Step 2 : create database instance using oradim command
    Step 3 : login using sys as sysdba to startup database, e.g startup nomount pfile='...\initxxx.ora'
    Step 4 : create database.
    java code showing below:
    private static void createEmsdbDatabase(){
    String url = "jdbc:oracle:thin:@localhost:1521:";
    StringBuffer sqlStatement = new StringBuffer();
    sqlStatement.append("create database xxx ");
    sqlStatement.append("maxdatafiles 254 ");
    sqlStatement.append("maxinstances 8 ");
    sqlStatement.append("maxlogfiles 32 ");
    sqlStatement.append("character set UTF8 ");
    sqlStatement.append("national character set UTF8 ");
    sqlStatement.append("DATAFILE 'c:\\oracle\\xxx\\system01.dbf' SIZE 18M REUSE ");
    sqlStatement.append("logfile 'c:\\oracle\\xxx\\redo01.log' SIZE 2M REUSE, ");
    sqlStatement.append("'c:\\oracle\\xxx\\redo02.log' SIZE 2M REUSE, ");
    sqlStatement.append("'c:\\oracle\\xxx\\redo03.log' SIZE 2M REUSE ");
    try {
    DriverManager.registerDriver(new OracleDriver());
    Properties props = new Properties();
    props.put("user", "sys");
    props.put("password", "password");
    props.put("database","xxx");
    props.put("internal_logon", "sysdba");
    Connection conn = DriverManager.getConnection(url, props);
    Statement statement = conn.createStatement();
    statement.executeUpdate(sqlStatement.toString());
    statement.close();
    conn.close();
    } catch (SQLException e) {
    e.printStackTrace();
    issue was met here, when i tried to login as sysdba using sys, and in my java code, i use Thin driver, it then thrus exception, but when OCI driver is used, it works great, i don't know why.
    that is, when i use "jdbc:oracle:oci8:@" as database URL and then properties.put("database","xxx"), it works great. but, when i use "jdbc:oracle:thin:@localhost:1521:" as database URL and then properties.put("database","xxx"), it failed. hopefully, i have clarified my question clearly. thanks.

  • Error using setTimestamp and ojdbc14 against Oracle 7.3.4

    I am having a problem setting a timestamp value against Oracle 7.3.4 and Oracle 8.0.6 databases.
    Here's the code:
    public Tester
    (String passedUsername, String passedPassword, String passedHostName, String passedPort, String passedSID)
    throws SQLException {
    // Establish a database connection
    try {
    Class.forName("oracle.jdbc.driver.OracleDriver");
    } catch (ClassNotFoundException e) { throw new SQLException("Can't find class oracle.jdbc.driver.OracleDriver"); }
    StringBuffer myStringBuffer = new StringBuffer(50);
    myStringBuffer.append("jdbc:oracle:thin:@");
    myStringBuffer.append(passedHostName);
    myStringBuffer.append(":");
    myStringBuffer.append(passedPort);
    myStringBuffer.append(":");
    myStringBuffer.append(passedSID);
    Connection myConnection = DriverManager.getConnection(myStringBuffer.toString(), passedUsername, passedPassword);
    myConnection.setAutoCommit(false);
    // Insert the test record
    PreparedStatement myPreparedStatement = null;
    try {
    myPreparedStatement = myConnection.prepareStatement("insert into test_table(date_field) values (?)");
    myPreparedStatement.setTimestamp(1, new Timestamp(System.currentTimeMillis()));
    myPreparedStatement.execute();
    } finally {
    if (myPreparedStatement != null) myPreparedStatement.close();
    Here's the error that occurs under Oracle 7.3.4:
    java.sql.SQLException: ORA-01024: invalid datatype in OCI call
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:656)
         at Tester.<init>(Tester.java:46)
         at Tester.main(Tester.java:62)
    Here's the error that occurs under Oracle 8.0.6:
    java.sql.SQLException: ORA-03115: unsupported network datatype or representation
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:656)
         at Tester.<init>(Tester.java:46)
         at Tester.main(Tester.java:62)
    Note that the table in the insert statement does not have to exist. You can even replace the statement with a garbage statement.
    The error is produced regardless.
    The code is being compiled under JDK 1.4
    I am using the latest version of the JDBC drivers (i.e. ojdbc14.jar)
    The code works fine under Oracle 8.1.7 and 9.0.1
    My code needs to access all four of these database version, sometimes concurrently, so I can only use a single driver class (i.e. I can't swap out ojdbc14.jar for classes12.zip).
    Any feedback would be appreciated!

    Hi,
    Only to say that we have the same problem like you:
    - Error ORA-01024 when connection to Oracle 8.0.1 on Sun Solaris
    - Error ORA-03115 when connection to Oracle 8.1.5 on Windows
    We are thinking about upgrading Oracle. Is it the only solution?
    Thank you

  • How to disable parent window while popup window is coming

    Hi,
    I am working on Oracle Applications 11i.
    I am able to get the popup window using the Java script in the controller.
    Please see the below code for the reference.
    String pubOrderId = pageContext.getParameter("orderId");
    StringBuffer l_buffer = new StringBuffer();
    StringBuffer l_buffer1 = new StringBuffer();
    l_buffer.append("javascript:mywin = openWindow(top, '");
    l_buffer1.append("/jct/oracle/apps/xxpwc/entry/webui/AddAttachmentPG");
    l_buffer1.append("&retainAM=Y");
    l_buffer1.append("&pubOrderId="+pubOrderId);
    String url = "/OA_HTML/OA.jsp?page="+l_buffer1.toString();
    OAUrl popupUrl = new OAUrl(url, OAWebBeanConstants.ADD_BREAD_CRUMB_SAVE );
    String strUrl = popupUrl.createURL(pageContext);
    l_buffer.append(strUrl.toString());
    l_buffer.append("', 'lovWindow', {width:750, height:550},false,'dialog',null);");
    pageContext.putJavaScriptFunction("SomeName",l_buffer.toString());
    But here the problem is, even though popup window is there, i am able to do the actions on the parent page.
    So how to disable the parent page, while getting the popup window.
    Thanks in advance.
    Thanks
    Naga

    Hi,
    You can use javaScript for disabling parent window as well.
    Refer below link for the same:
    http://www.codeproject.com/Questions/393481/Parent-window-not-disabling-when-pop-up-appears-vi
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • ODI Error Unable to load data

    Hi Frnds,
    I'm New to ODI tech. i need your assistance in resolving the following issue:
    My source has - 6 rows of data
    My target has - no rows.
    both source and target are oracle, and i used Ikm: sql to oracle and IKM: sql control append and oracle incremental update
    but still it was unable to load the data.
    In the operator window, i was able to view that data have been loaded. - in step 3.
    But in step 6 - integration - insert new rows showing error.
    The Return code of error : 4098
    Message: ora-04098: trigger is invalid and failed revalidation.
    Even, when i tried using toad to enter the data into target database manually by writing query. It was showing same error for me.
    Is the issue is with ODI or with Oracle database ?
    Is there any method to resolve the issue ? How do we handle triggers in ODI ?
    Thanks in advance,
    Raj.

    Nobody would know the answer to your question.
    Yes you can drop the trigger. You can also drop the table too. And there will be no need to create an interface or move data.
    Sorry, I am being sarcastic here.
    We will not know if that trigger is needed or not. Maybe it belongs to an ERP app that is maintaining some business rules or its an OBIEE staging area and needs trigger to validate data. Who knows.
    You should ask your administrator as to why the trigger is invalid. What is the use of the trigger. Try to find out the source of the problem.
    You should not simply drop the trigger.

  • Adclonectx.pl fails on db tier with RC-50004: Error occurred in CloneContext - using options addnode noprompt

    I'm trying to run adclonectx.pl non-interactively using a pairsfile and noprompt to automate my clone, this is to create the second node context file on the db tier of a 2 node Linux RAC environment and is the only bit that's still interactive so it would be really cool to get this working!
    I'm using a pairsfile with all the variables from a sucessfull interactive run, I probably need to add more variables to this file though I can't figure out what.
    Has anyone else got this working?
    EBS 12.1.3 DB 11.2.0.3 RAC.
    This is the command I run, I'm using host variables which are defined beforehand.
    --this bit just shows the variables are valid
    [orebsdba@dxd1client02 clone_dev]$ echo $CONTEXT_NAME2
    EBSDBA2_dxd1db02-ib
    [orebsdba@dxd1client02 clone_dev]$ echo $SRCCTX
    /u01/EBSDBA/product/11.2.0/appsutil/EBSDBA1_dxd1db01-ib.xml
    [orebsdba@dxd1client02 clone_dev]$ echo $NEWCTX
    /u01/EBSDBA/product/11.2.0/appsutil/EBSDBA2_dxd1db02-ib.xml
    [orebsdba@dxd1client02 clone_dev]$ cd ${ORACLE_HOME}/appsutil/clone/bin
    [orebsdba@dxd1client02 bin]$ cp ${SRCCTX} ${DBMNT}/${SID}/tmp
    [orebsdba@dxd1client02 bin]$ export APPSPWD=**********
    echo \$APPSPWD | perl ./adclonectx.pl \
    > contextfile=$SRCCTX \
    > template=$ORACLE_HOME/appsutil/template/adxdbctx.tmp \
    > outfile=$NEWCTX \
    > pairsfile=$PAIRSFILE \
    > addnode noprompt
    Copyright (c) 2002 Oracle Corporation
    Redwood Shores, California, USA
    Oracle Applications Rapid Clone
    Version 12.0.0
    adclonectx Version 120.23.12010000.1
    Running:
    /u01/EBSDBA/product/11.2.0/appsutil/clone/bin/../jre/bin/java -Xmx600M -classpath /u01/EBSDBA/product/11.2.0/appsutil/clone/bin/../jlib/ojdbc5.jar:/u01/EBSDBA/product/11.2.0/appsutil/clone/bin/../jlib/xmlparserv2.jar:/u01/EBSDBA/product/11.2.0/appsutil/clone/bin/../jlib/java oracle.apps.ad.context.CloneContext -e /u01/EBSDBA/product/11.2.0/appsutil/EBSDBA1_dxd1db01-ib.xml -tmpl /u01/EBSDBA/product/11.2.0/appsutil/template/adxdbctx.tmp -pairsfile /u01/EBSDBA/product/11.2.0/appsutil/clone/pairsfile2.txt -out /u01/EBSDBA/product/11.2.0/appsutil/EBSDBA2_dxd1db02-ib.xml -addnode -noprompt
    Log file located at /u01/EBSDBA/product/11.2.0/appsutil/log/CloneContext_0916151900.log
    RC-50004: Error occurred in CloneContext:
    null
    Check Clone Context logfile /u01/EBSDBA/product/11.2.0/appsutil/log/CloneContext_0916151900.log for details.
    ERROR: context creation not completed successfully.
    Log contains this:
    Using admin directory: /u01/EBSDBA/product/11.2.0/appsutil
    #------Log File time stamp: 0916151900------------
    # $Header: CloneContext.java 120.92.12010000.26 2013/05/06 12:02:01 mmanku ship $
    # Running on          - dxd1client02
    # Source Host         - null
    # Domain Name         - mgmt.shared.health.nz
    # Context Location    - /u01/EBSDBA/product/11.2.0/appsutil/EBSDBA1_dxd1db01-ib.xml
    # Context Type        - null
    # Context Template    - /u01/EBSDBA/product/11.2.0/appsutil/template/adxdbctx.tmp
    # Clone Stage Area    - null
    # Pairs File          - /u01/EBSDBA/product/11.2.0/appsutil/clone/pairsfile2.txt
    # Destination Context - /u01/EBSDBA/product/11.2.0/appsutil/EBSDBA2_dxd1db02-ib.xml
    # Validation          - false
    # Platform Migration  - false
    # no prompt           - true
    Variables extracted from pairsfile: /u01/EBSDBA/product/11.2.0/appsutil/clone/pairsfile2.txt
    ****************************************************/n
      s_undo_tablespace  =  APPS_UNDOTS2
      s_dbClusterInst  =  2
      s_db_oh  =  /u01/EBSDBA/product/11.2.0
      s_dbhost  =  dxd1db02-ib
      s_dbSid  =  EBSDBA2
      s_hostname  =  dxd1db02-ib
      s_dbGlnam  =  EBSDBA
      s_database_type  =  RAC
      s_virtual_hostname  =  dxd1db02-ib
      s_clusterInterConnects  =  dxd1db02-priv
      s_base  =  /u01/EBSDBA
      s_dbuser  =  orebsdba
      s_dbgroup  =  oinstall
      s_db_util_filedir  =  /u01/EBSDBA/tmp
      s_dbhome1  =  +DATA_DXD1
      s_display  =  dxd1db02-ib:0.0
      s_instName  =  EBSDBA2
      s_domainname  =  mgmt.shared.health.nz
      s_instThread  =  2
      s_dbCluster  =  true
      s_contextname  =  EBSDBA2_dxd1db02-ib
      s_dbdomain  =  mgmt.shared.health.nz
      s_instNumber  =  2
      s_db_ons_remoteport  =  6414
      s_db_ons_localport  =  6314
      s_cmanport  =  1535
      s_dbport  =  1535
      s_port_pool  =  14
    StackTrace:
    java.lang.NullPointerException
    at oracle.apps.ad.context.CloneContext$RACContext.checkRACDBConnection(CloneContext.java:6424)
    at oracle.apps.ad.context.CloneContext$RACContext.access$400(CloneContext.java:5655)
    at oracle.apps.ad.context.CloneContext.getInputDBRACAdd(CloneContext.java:1587)
    at oracle.apps.ad.context.CloneContext.getInputFromUsers(CloneContext.java:988)
    at oracle.apps.ad.context.CloneContext.doClone(CloneContext.java:601)
    at oracle.apps.ad.context.CloneContext.main(CloneContext.java:5266)
    RC-50004: Error occurred in CloneContext:
    null
    Context file creation not succesful
    I have been trying to work my way through the stack trace and the source code.  I can see that getInputFromUsers() is called and that then calls getInputDBRACAdd().   That will then call checkRACDBConnection().  The question is where in checkRACDBConnection() – source code below – is it finding the NULL?
    I am guessing that as we don’t see the following in the log file:
    LogFile.getLogFile().info("Attempting to connect to database using :\n");
    the NULL has to happen before this line.  This gives us to work with:
    s = CloneContext.access$2000(CloneContext.this).getReplValIgnoreCase("s_apps_user").toString();
            if(CloneContext.access$2500(CloneContext.this) == null)
                CloneContext.access$2502(CloneContext.this, CloneContext.access$1400(CloneContext.this, "APPS password is required to validate database connection \nEnter APPS Password [APPS]"));
            i = 0;
    _L2:
            String s1;
            if(i >= m_racHostList.length)
                break; /* Loop/switch isn't completed */
            s1 = (new StringBuilder()).append("jdbc:oracle:thin:@").append(m_racHostList[i]).append(".").append(m_racdomain).append(":").append(m_racPortList[i]).append(":").append(m_racSidList[i]).toString();
    Not  much.
    Could it be this?
    if(i >= m_racHostList.length)
    In which case perhaps s_rachostlist needs to be set?  But I think the length function should return 0 not NULL if something is unset, so perhaps not.
    I am not sure there would be a problem with s_apps_user or the string assignment.
    So perhaps it’s the loop.
    i = 0;
    _L2:
            String s1;
            if(i >= m_racHostList.length)
                break; /* Loop/switch isn't completed */
    ‘i’ is set to 0.  If m_racHostList.length is 0 that means it breaks out of the conditional and, though I don’t know enough Java to be sure, as the function throws an exception, perhaps it goes into the exception handler:
    catch(Exception exception)
                Object obj1 = null;
                String as[] = {
                    m_racSidList[i]
                String s2 = MessageHandler.getMessage("RC-40201", as, 0, false);
                LogFile.getLogFile().printStackTrace(exception);
                LogFile.getLogFile().info(s2);
                i++;
    But that gives us an RC-40201 message, which isn’t what I'm seeing.
    So I just don’t know, unless s_rachostlist is the key, I am out of ideas.
    Has anyone else done this?
    I've also raised an SR but haven't had a response yet.
    Thanks in advance.
    Jeremy

    further info..
    I've pulled these variables out of the java code and added them to the pairsfile which gets rid of the null value problem but now it returns a tns error..
    s_isDBCluster=Y
    s_rachostlist=dxd1db01-ib
    s_racdomain=xxxxxxxxxxxxxxx
    s_racsidlist=EBSDBA
    s_racportlist=1535
    s_rachostlist=dxd1db02-ib                      
    s_racvirtualhostlist=dxd1db02-ib                      
    s_racinstnumlist=2
    s_clusterInterConnects=dxd1db02-priv
    we noticed that s_rachostlist is used for two different values in the java code, interactilvey this value is prmpted for twice using the same variable - this may be causing our problem.
    strangely when run interactively the tns connectivity details are the same as when run interactively, the first works the latter doesn't ...
    we're thinking this could be a bug...
    Cheers
    Jeremy

  • Calling Javascript function in setOnBlur is throwing error

    Hi ,
    I have a requirement to open a popup window using javascript.I have tried to achieve this using the following code in the PR of that extended CO.
    StringBuffer l_buffer = new StringBuffer();
    StringBuffer l_buffer1 = new StringBuffer();
    l_buffer.append("javascript:mywin = openWindow(top, '");
    l_buffer1.append("/xxmas/oracle/apps/asn/custom/oppnameval/webui/XXMASNewOppPG");
    l_buffer1.append("&amp;retainAM=Y");
    String url = "OA.jsp?page=";+l_buffer1.toString();
    OAUrl popupUrl = new OAUrl(url, OAWebBeanConstants.ADD_BREAD_CRUMB_SAVE );
    String strUrl = popupUrl.createURL(pageContext);
    l_buffer.append(strUrl.toString());
    l_buffer.append("', 'lovWindow', {width:750, height:550},false,'dialog',null);");
    pageContext.putJavaScriptFunction("testonblur",l_buffer.toString());
    OAMessageTextInputBean mcb1 =
    (OAMessageTextInputBean)webBean.findChildRecursive("ASNOpptyCrteNm");
    mcb1.setOnBlur("testonblur");
    but while i am trying to open the page for the first time it is trying to open the javascript page as per the above coding and throwing "You have insufficient privileges for the current operation. Please contact your System Administrator. " error.
    Please suggest if i need to set any profile option to fix this issue.
    I also want when the page will be loaded for the first time this javascript window will not be opened rather it should open when i will enter some value in the textinput bean (mcb1 in the above code) and will tab out of that field(i.e. when the textinput bean will loose focus).
    Please note i can't use PPR to achieve the above functionality since client specifically wants this javascript and onblur API to be used.
    Please help me out... this is an urgent requirement.
    Thanks
    Subha

    Hi  Marcin,
    Thankyou for your quick reply.
    It is server side scripting only. but i have already chekced the link which u sent me. i did not find anything realted ... we are not able to debug the issue?
                This is the place where it is throwing the error:
           var lv_pct=`FREM-TBR_PCT[j]`
                       if (parseInt("`lv_pct`") == `i`)
    is the syntax of the code is correct?
    Do you want me to send the whole code to you?
    Also please tell me if there any way to debug the javascripts  for this IAC applications.
    Thanks & Regards,
    Kavitha.

  • Binding parameters does not work properly

    Hi,
    I've installed the ODT with ODA (ODTwithODAC1110720) in my Windows developer enviroment.
    I've a .NET 2008 project, using the Oracle.DataAccess library, v2.0.50727.
    I need to call a PL/SQL function developed in Oracle 11.1.0.6.
    This is the c# function I wrote to insert (throught that PL/SQL function) a record:
    public static string InsertContact(OracleConnection conn, string in_id_user, string in_i_type_contact, string in_priority, string iv_contact, string iv_note)
    StringBuilder sbSQL = new StringBuilder();
    sbSQL.Append("declare ");
    sbSQL.Append(" id_contact number; ");
    sbSQL.Append("begin ");
    sbSQL.Append(" :id_contact := pk_contact.insert_record( ");
    sbSQL.Append(" :in_id_user");
    sbSQL.Append(" ,:in_i_type_contact");
    sbSQL.Append(" ,:in_priority");
    sbSQL.Append(" ,:iv_contact");
    sbSQL.Append(" ,:iv_note");
    sbSQL.Append(" ); ");
    sbSQL.Append("end;");
    Oracle.DataAccess.Client.OracleCommand cmd = conn.CreateCommand();
    cmd.CommandText = sbSQL.ToString();
    cmd.Parameters.Add("in_id_user", OracleDbType.Int32).Value = "265";
    cmd.Parameters.Add("in_i_type_contact", OracleDbType.Int32).Value = "1";
    cmd.Parameters.Add("in_priority", OracleDbType.Int32).Value = Convert.DBNull;
    cmd.Parameters.Add("iv_contact", OracleDbType.Int32).Value = "348";
    cmd.Parameters.Add("iv_note", OracleDbType.Varchar2).Value = Convert.DBNull;
    cmd.Parameters.Add("id_contact", OracleDbType.Int32, ParameterDirection.ReturnValue);
    cmd.ExecuteScalar();
    // Return the new id_user
    return cmd.Parameters["id_contact"].Value.ToString();
    This was working fine when I used the System.Data.OracleClient library (I was using DbType instead of OracleDbType, and Number instead of Int32, and Varchar instead of Varchar2).
    Now it seems that the parameters are not bound, the PL/SQL functionreceives all NULL.
    What am I doing wrong?
    Thanks in advance,
    Samuel

    Hi,
    You didnt provide the interface of the PLSQL procedure, but it looks like you're having a problem because the ReturnValue parameter is currently appended last, and needs to come first. ODP defaults to Bind By Position, so the parameters ned to be added in the order declared in the statement. There's also a cmd.BindByName property you can set to true if you want to change the default behavior.
    Also, not that it's illegal or anyting, but you dont really need to go through the trouble of creating your own anonymous block to call the proc. You could just set
    cmd.CommandText = "pk_contact.insert_record"
    cmd.CommandType = CommandType.StoredProcedureand then apend the parameters in the right order(again, returnvalue gets added first).
    Hope it helps,
    Greg
    Edited by: gdarling on Jul 7, 2010 9:16 AM
    Note also that the ODP forum would be more appropriate for future ODP questions, and is located at ODP.NET

  • Opening a File Dialog Box

    Hi,
    could somebody help me with how to open a file dialog box.
    I have 1 class which has a window with the relevant widgets on it, I want to be able to click a button on the form and pop up a file chooser form then select a file or type in a new filename and then use the selected filename path in the original form to write data out to the chosen file.
    i understand that i need to use JFileChooser and it will need to be in a new class (like a dialog box would be).
    So basically what i have is 2 classes (the main app and a class called FileOpen.class) so how would i display the fileopen class with the JFileChooser component in it and return what ever is chosen into a string.
    e.g.
    String fileName = <what would go here?>
    kind regards

    thats the example filechooser i have working
    yet when i try and implement it in my program i just get countless exception errors, im not sure if its because my program extends Jframe and not JPanel
    here is my code:-
    package as4;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import java.util.*;
    import javax.swing.filechooser.*;
    import java.io.*;
    * <p>Title: </p>
    * <p>Description: </p>
    * <p>Copyright: Copyright (c) 2003</p>
    * <p>Company: </p>
    * @author unascribed
    * @version 1.0
    * <p>Title: </p>
    * <p>Description: </p>
    * <p>Copyright: Copyright (c) 2003</p>
    * <p>Company: </p>
    * @author unascribed
    * @version 1.0
    public class Readap extends JFrame {
    JPanel contentPane;
    GridLayout gridLayout1 = new GridLayout();
    JPanel jPanel3 = new JPanel();
    GridLayout gridLayout3 = new GridLayout();
    JPanel jPanel1 = new JPanel();
    JTextArea txtaStatus = new JTextArea();
    JLabel jLabel1 = new JLabel();
    JTextField txtCon = new JTextField();
    JButton btnConnect = new JButton();
    JTextField txtPort = new JTextField();
    JTextField txtUser = new JTextField();
    GridLayout gridLayout2 = new GridLayout();
    JLabel jLabel6 = new JLabel();
    JPasswordField ptxtPass = new JPasswordField();
    JLabel jLabel5 = new JLabel();
    JLabel jLabel4 = new JLabel();
    JLabel jLabel3 = new JLabel();
    JLabel jLabel2 = new JLabel();
    JTextField txtHost = new JTextField();
    JPanel jPanel2 = new JPanel();
    JPanel jPanel4 = new JPanel();
    GridLayout gridLayout4 = new GridLayout();
    GridLayout gridLayout5 = new GridLayout();
    JCheckBox chbOracle = new JCheckBox();
    JCheckBox chbOdbc = new JCheckBox();
    JScrollPane jScrollPane1 = new JScrollPane();
    JRadioButton rbtnComma = new JRadioButton();
    JRadioButton rbtnTab = new JRadioButton();
    JRadioButton rbtnSpace = new JRadioButton();
    ButtonGroup delChoice = new ButtonGroup();
    JPanel delPanel = new JPanel();
    JFileChooser fc;
    int dbChoice = 1;
    int conStatus = 0 ;
    String delimiter=",";
    String output="";
    JButton btnClear = new JButton();
    Dbfuncs mydb=new Dbfuncs();
    JPanel jPanel7 = new JPanel();
    JPanel jPanel6 = new JPanel();
    JPanel jPanel5 = new JPanel();
    FlowLayout flowLayout1 = new FlowLayout();
    JButton btnExecute = new JButton();
    JTextField txtQuery = new JTextField();
    JLabel jLabel7 = new JLabel();
    JButton btnOutput = new JButton();
    JLabel jLabel8 = new JLabel();
    GridLayout gridLayout7 = new GridLayout();
    BorderLayout borderLayout1 = new BorderLayout();
    JButton btnExit = new JButton();
    TitledBorder titledBorder1;
    TitledBorder titledBorder2;
    JCheckBox chbQuotes = new JCheckBox();
    JPanel jPanel8 = new JPanel();
    JCheckBox chbHeading = new JCheckBox();
    JPanel jPanel9 = new JPanel();
    ButtonGroup fileChoice = new ButtonGroup();
    JRadioButton rbtnOverwrite = new JRadioButton();
    JRadioButton rbtnAppend = new JRadioButton();
    //Construct the frame
    public Readap() {
    fc = new JFileChooser();
    fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
    enableEvents(AWTEvent.WINDOW_EVENT_MASK);
    try {
    jbInit();
    catch(Exception e) {
    e.printStackTrace();
    //Component initialization
    private void jbInit() throws Exception {
    //setIconImage(Toolkit.getDefaultToolkit().createImage(Readap.class.getResource("[Your Icon]")));
    contentPane = (JPanel) this.getContentPane();
    titledBorder1 = new TitledBorder("");
    titledBorder2 = new TitledBorder("");
    contentPane.setLayout(gridLayout1);
    this.setSize(new Dimension(448, 434));
    this.setTitle("Read Database");
    gridLayout1.setColumns(1);
    gridLayout1.setHgap(2);
    gridLayout1.setRows(2);
    gridLayout1.setVgap(2);
    jPanel3.setLayout(gridLayout3);
    gridLayout3.setColumns(2);
    gridLayout3.setHgap(5);
    gridLayout3.setVgap(5);
    txtaStatus.setFont(new java.awt.Font("Dialog", 0, 10));
    txtaStatus.setBorder(BorderFactory.createLoweredBevelBorder());
    txtaStatus.setEditable(false);
    txtaStatus.setText(">>Program Loaded...");
    txtaStatus.setLineWrap(true);
    txtaStatus.setRows(5);
    txtaStatus.setWrapStyleWord(true);
    jLabel1.setFont(new java.awt.Font("Dialog", 1, 12));
    jLabel1.setToolTipText("");
    jLabel1.setHorizontalAlignment(SwingConstants.CENTER);
    jLabel1.setText("Please choose a database...");
    txtCon.setText("Access");
    btnConnect.setText("Connect");
    btnConnect.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    btnConnect_actionPerformed(e);
    txtPort.setEnabled(false);
    txtPort.setToolTipText("");
    txtPort.setText("1521");
    gridLayout2.setColumns(2);
    gridLayout2.setHgap(5);
    gridLayout2.setRows(6);
    gridLayout2.setVgap(2);
    jLabel6.setHorizontalAlignment(SwingConstants.RIGHT);
    jLabel6.setText("Password");
    jLabel5.setHorizontalAlignment(SwingConstants.RIGHT);
    jLabel5.setText("Username");
    jLabel4.setHorizontalAlignment(SwingConstants.RIGHT);
    jLabel4.setText("ODBC Bridge");
    jLabel3.setHorizontalAlignment(SwingConstants.RIGHT);
    jLabel3.setText("Port");
    jLabel2.setHorizontalAlignment(SwingConstants.RIGHT);
    jLabel2.setText("Host");
    txtHost.setEnabled(false);
    txtHost.setText("alfgar.coventry.ac.uk");
    jPanel2.setLayout(gridLayout2);
    contentPane.setMinimumSize(new Dimension(100, 110));
    jPanel4.setLayout(gridLayout4);
    gridLayout4.setColumns(1);
    gridLayout4.setHgap(2);
    gridLayout4.setRows(3);
    gridLayout4.setVgap(2);
    jPanel1.setLayout(gridLayout5);
    gridLayout5.setColumns(1);
    gridLayout5.setHgap(5);
    gridLayout5.setRows(2);
    gridLayout5.setVgap(5);
    rbtnComma.setText("Comma");
    rbtnComma.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    rbtnComma_actionPerformed(e);
    rbtnTab.setText("Tab");
    rbtnTab.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    rbtnTab_actionPerformed(e);
    rbtnSpace.setText("Space");
    rbtnSpace.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    rbtnSpace_actionPerformed(e);
    rbtnComma.setSelected(true);
    jLabel8.setFont(new java.awt.Font("Dialog", 1, 12));
    jLabel8.setHorizontalAlignment(SwingConstants.CENTER);
    jLabel8.setText("Choose Delimiter Type");
    jPanel7.setLayout(gridLayout7);
    gridLayout7.setColumns(1);
    gridLayout7.setRows(6);
    jPanel6.setMinimumSize(new Dimension(434, 45));
    jPanel6.setPreferredSize(new Dimension(434, 45));
    btnExit.setText("Exit");
    btnExit.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    btnExit_actionPerformed(e);
    jPanel5.setBorder(titledBorder2);
    jPanel5.setMinimumSize(new Dimension(434, 187));
    jPanel3.setBorder(titledBorder1);
    btnExecute.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    btnExecute_actionPerformed(e);
    chbQuotes.setText("Wrap Data In Quotes");
    chbHeading.setText("Export Column Headings");
    rbtnOverwrite.setSelected(true);
    rbtnOverwrite.setText("Overwrite File");
    rbtnAppend.setText("Append File");
    jPanel7.setBorder(BorderFactory.createLineBorder(Color.black));
    btnOutput.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    btnOutput_actionPerformed(e);
    delChoice.add(rbtnComma);
    delChoice.add(rbtnTab);
    delChoice.add(rbtnSpace);
    delPanel.add(rbtnComma);
    delPanel.add(rbtnTab);
    delPanel.add(rbtnSpace);
    chbOracle.setAlignmentX((float) 10.0);
    chbOracle.setHorizontalAlignment(SwingConstants.CENTER);
    chbOracle.setText("Oracle");
    chbOracle.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    chbOracle_actionPerformed(e);
    chbOdbc.setAlignmentX((float) 10.0);
    chbOdbc.setHorizontalAlignment(SwingConstants.CENTER);
    chbOdbc.setSelected(true);
    chbOdbc.setText("MS ODBC");
    chbOdbc.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    chbOdbc_actionPerformed(e);
    btnClear.setText("Clear Status");
    btnClear.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    btnClear_actionPerformed(e);
    jPanel6.setLayout(flowLayout1);
    jPanel5.setLayout(borderLayout1);
    btnExecute.setText("Execute");
    txtQuery.setMinimumSize(new Dimension(280, 21));
    txtQuery.setPreferredSize(new Dimension(285, 21));
    jLabel7.setFont(new java.awt.Font("Dialog", 1, 12));
    jLabel7.setText("Enter Query");
    btnOutput.setText("Output To File");
    jPanel3.add(jPanel1, null);
    jPanel1.add(jPanel4, null);
    jPanel4.add(jLabel1, null);
    jPanel4.add(chbOdbc, null);
    jPanel4.add(chbOracle, null);
    jPanel1.add(jScrollPane1, null);
    jScrollPane1.getViewport().add(txtaStatus, null);
    jPanel3.add(jPanel2, null);
    jPanel2.add(jLabel2, null);
    jPanel2.add(txtHost, null);
    jPanel2.add(jLabel3, null);
    jPanel2.add(txtPort, null);
    jPanel2.add(jLabel4, null);
    jPanel2.add(txtCon, null);
    jPanel2.add(jLabel5, null);
    jPanel2.add(txtUser, null);
    jPanel2.add(jLabel6, null);
    jPanel2.add(ptxtPass, null);
    jPanel2.add(btnClear, null);
    jPanel2.add(btnConnect, null);
    jPanel6.add(jLabel7, null);
    jPanel6.add(txtQuery, null);
    jPanel6.add(btnExecute, null);
    jPanel7.add(jLabel8, null);
    jPanel7.add(delPanel, null);
    jPanel7.add(jPanel8, null);
    jPanel8.add(chbQuotes, null);
    jPanel8.add(chbHeading, null);
    jPanel7.add(jPanel9, null);
    jPanel9.add(rbtnOverwrite, null);
    jPanel9.add(rbtnAppend, null);
    jPanel7.add(btnOutput, null);
    jPanel7.add(btnExit, null);
    jPanel5.add(jPanel6, BorderLayout.NORTH);
    jPanel5.add(jPanel7, BorderLayout.SOUTH);
    contentPane.add(jPanel3, null);
    contentPane.add(jPanel5, null);
    fileChoice.add(rbtnOverwrite);
    fileChoice.add(rbtnAppend);
    //Overridden so we can exit when window is closed
    protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
    System.exit(0);
    public static void main (String arguments[])
    JFrame frame = new Readap();
    WindowListener l = new WindowAdapter()
         public void windowClosing(WindowEvent e)
              System.exit(0);
    frame.addWindowListener(l);
    frame.pack();
    frame.setVisible(true);
    void chbOracle_actionPerformed(ActionEvent e) {
    dbChoice=0;
    chbOdbc.setSelected(false);
    jLabel4.setText("Conn String");
    txtCon.setText("acal");
    txtCon.setEnabled(true);
    txtPort.setEnabled(true);
    txtHost.setEnabled(true);
    txtaStatus.append("\n>>Oracle Database Selected");
    void chbOdbc_actionPerformed(ActionEvent e) {
    dbChoice=1;
    chbOracle.setSelected(false);
    jLabel4.setText("ODBC Bridge");
    txtCon.setText("Access");
    txtPort.setEnabled(false);
    txtHost.setEnabled(false);
    txtaStatus.append("\n>>MS ODBC Database Selected");
    void btnConnect_actionPerformed(ActionEvent e) {
    if (conStatus==0)
    String url = new String();
    String driver = new String();
    if (dbChoice==0)
    driver="oracle.jdbc.driver.OracleDriver";
    url = "jdbc:oracle:thin:@"+txtHost.getText()+":"+txtPort.getText()+":"+txtCon.getText();
    txtaStatus.append("\n>>Connecting to Oracle Database @ "+url+" via driver:"+driver);
    else
    driver = "sun.jdbc.odbc.JdbcOdbcDriver";
    url = "jdbc:odbc:"+txtCon.getText();
    txtaStatus.append("\n>>Connecting to MS ODBC Database @ "+url+" via driver:"+driver);
    String dbStatus=mydb.openDb(url, driver, txtUser.getText(), ptxtPass.getText());
    txtaStatus.append("\n>>"+dbStatus);
    if (dbStatus=="Connection Successful")
    btnConnect.setText("Disconnect");
    conStatus=1;
    else
    mydb.dbClose();
    txtaStatus.append("\n>>Database Connection Terminated");
    btnConnect.setText("Connect");
    conStatus=0;
    void btnClear_actionPerformed(ActionEvent e) {
    txtaStatus.setText(" ");
    void rbtnComma_actionPerformed(ActionEvent e) {
    delimiter=",";
    void rbtnSpace_actionPerformed(ActionEvent e) {
    delimiter=" ";
    void btnExecute_actionPerformed(ActionEvent e) {
    txtaStatus.append(mydb.runQuery(txtQuery.getText() ) );
    void btnOutput_actionPerformed(ActionEvent e) {
    if (chbHeading.isSelected()==true)
    output=mydb.getAllColName(mydb.getColumnName())+"\n";
    else
    output="";
    Vector mydata=mydb.getResultData();
         int cnt=0;
         for (int index = 0; index < mydata.size(); index++)
              cnt+=1;
              if (cnt>1) output=output+delimiter;
    if (chbQuotes.isSelected()==true)
              output=output+"\""+mydata.elementAt(index)+"\"";
    else
    output=output+mydata.elementAt(index);
              if (cnt>=mydb.getNumCols())
                   output=output+"\n"; cnt=0;
    txtaStatus.append("\n>>"+output);
    int returnVal = fc.showOpenDialog(Readap.this);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
    File file = fc.getSelectedFile();}
    void rbtnTab_actionPerformed(ActionEvent e) {
    delimiter="\t";
    void btnExit_actionPerformed(ActionEvent e) {
    System.exit(0);
    }

  • Having problem with Webutil

    Hello everyone,
    When I want to upload a document in the database from the client machine, it gives error of
    ORA-04063: package body 'SCOTT.WEBUTIL_DB' has errors
    I installed and configured webutil correctly but I can't figure out what's the problem.
    Can someone help me please??

    hi
    please read it properly i hope it will help u too.
    Configure WebUtil 1.06
    How to get up and running with WebUtil 1.06 included with Oracle Developer Suite 10.1.2.0.2 on a win32 platform,
    I also tested it on Linux and it works well (after of course taking care of the differences in PATH format)
    Solution
    Assuming a fresh "Complete" install of Oracle Developer Suite 10.1.2.0.2,
    here are steps to get a small test form running, using WebUtil 1.06.
    Note: Oracle_Home is used as an alias for your real oDS ORACLE_HOME.
    Feel free to copy this note to a text editor, and do a global find/replace on
    Oracle_Home with your actual value (no trailing slash). Then it is easy to
    copy/paste actual commands to be executed from the note copy.
    1) Download http://prdownloads.sourceforge.net/jacob-project/jacob_18.zip
      and extract to a temporary staging area. Do not attempt to use 1.7 or 1.9.
    2) Copy or move jacob.jar and jacob.dll
      C:\webutile is the folder where you extracted Jacob, and will end in ...\jacob_18
         cd C:\webutile
         copy jacob.jar C:\DevSuiteHome_1\forms\java\.
         copy jacob.dll C:\DevSuiteHome_1\forms\webutil\.
      The Jacob staging area is no longer needed, and may be deleted.
    3) Sign frmwebutil.jar and jacob.jar
      Open a DOS command prompt.
      Add C:\DevSuiteHome_1\jdk\bin to the PATH:
         set PATH=C:\DevSuiteHome_1\jdk\bin;%PATH%
      Sign the files, and check the output for success:
         C:\DevSuiteHome_1\forms\webutil\sign_webutil C:\DevSuiteHome_1\forms\java\frmwebutil.jar
         C:\DevSuiteHome_1\forms\webutil\sign_webutil C:\DevSuiteHome_1\forms\java\jacob.jar
    4) If you already have a schema in your RDBMS which contains the WebUtil stored code,
      you may skip this step. Otherwise,
      Create a schema to hold the WebUtil stored code, and privileges needed to
      connect and create a stored package. Schema name "WEBUTIL" is recommended
      for no reason other than consistency over the user base.
      Open C:\DevSuiteHome_1\forms\create_webutil_db.sql in a text editor, and delete or comment
      out the EXIT statement, to be able to see whether the objects were created witout
      errors.
      Start SQL*Plus as SYSTEM, and issue:
         CREATE USER webutil IDENTIFIED BY a
         DEFAULT TABLESPACE users
         TEMPORARY TABLESPACE temp;
         GRANT CONNECT, CREATE PROCEDURE, CREATE PUBLIC SYNONYM TO webutil;
         CONNECT webutil/webutil@rcci
         @C:\DevSuiteHome_1\forms\create_webutil_db.sql
         -- Inspect SQL*Plus output for errors, and then
         CREATE PUBLIC SYNONYM webutil_db FOR webutil.webutil_db;
      Reconnect as SYSTEM, and issue:
         grant execute on webutil_db to public;
    5) Modify C:\DevSuiteHome_1\forms\server\default.env, and append C:\oracle\developer\jdk\jre\lib\rt.jar
      to the CLASSPATH entry.
    6) Modify C:\DevSuiteHome_1\forms\server\formsweb.cfg insde [default] add :
        archive_jini=frmall_jinit.jar,frmwebutil.jar,jacob.jar
        archive=frmall.jar
        also add  :
        [webutil]
        WebUtilLogging=off
        WebUtilLoggingDetail=normal
        WebUtilErrorMode=Alert
        WebUtilDispatchMonitorInterval=5
        WebUtilTrustInternal=true
        WebUtilMaxTransferSize=16384
        baseHTMLjinitiator=webutiljini.htm
        baseHTMLjpi=webutiljpi.htm
        baseHTML=webutilbase.htm
        archive_jini=frmall_jinit.jar
        WebUtilArchive=frmwebutil.jar,jacob.jar,f90all.jar
        archive=frmwebutil.jar,f90all.jar
        lookAndFeel=oracle
    7) Modify  C:\DevSuiteHome_1\forms\server\webutil.cfg and add :
        transfer.database.enabled=TRUE
        transfer.appsrv.enabled=TRUE
    8) Start the OC4J instance
    9) Start Forms Builder and connect to a schema in the RDBMS used in step (4).
      Open webutil.pll, do a "Compile ALL" (shift-Control-K), and generate to PLX (Control-T).
      It is important to generate the PLX, to avoid the FRM-40039 discussed in
      Note 303682.1
      If the PLX is not generated, the Webutil.pll library would have to be attached with
      full path information to all forms wishing to use WebUtil. This is NOT recommended.
    10) Create a new FMB.
      Open webutil.olb, and Subclass (not Copy) the Webutil object to the form.
      There is no need to Subclass the WebutilConfig object.
      Attach the Webutil.pll Library, and remove the path.
      Add an ON-LOGON trigger with the code
             NULL;
      to avoid having to connect to an RDBMS (optional).
      Create a new button on a new canvas, with the code
             show_webutil_information (TRUE);
      in a WHEN-BUTTON-PRESSED trigger.
      Compile the FMB to FMX, after doing a Compile-All (Shift-Control-K).
    11) Under Edit->Preferences->Runtime in Forms Builder, click on "Reset to Default" if
      the "Application Server URL" is empty.
      Then append "?config=webutil" at the end, so you end up with a URL of the form
          http://server:port/forms/frmservlet?config=webutil
    12) Run your form.sarah

  • Schema name gets lost in create/drop index statement

    Hi everyone,
    I have a relational model with appended physical Oracle 10g model, containing indexes (among other stuff). Although the schema name is set in the relational model and the user is set in the physical model, they are ignored in the creation and alter scripts.
    Is that a bug?
    Yours,
    user8632123

    Hi Bernd,
    I tried again using a DBA-user on a 10g-database, but the object privileges are NOT imported.I have logged a bug that that only one object privilege is imported for a given user. (Any other object privileges for that user are missing.) It appears that this problem affects both Oracle 10g and Oracle 11g databases.
    I also noticed that, after they have been created manually, they do not show up in alter scripts (preview script from compare/merge).I have logged a bug on this.
    On the side, do we really need DBA-privileges for reverse engineering, or are the roles "select any table" and "select dictionary" sufficient?Agreed. We are already making changes to this. In the next release, if the connection user does not have DBA privilege, we should still be able to import the object privilege information.
    schema names are missing in alter scripts in more cases. For instance, they are not created for column comments.I logged a bug that in Compare/Merge DDL, if a Column Comment is added, the Schema name is missing from the COMMENT ON COLUMN statement.
    Thanks for letting us know about these problems.
    David

Maybe you are looking for

  • IMovie 6 FCE - odd error, plan B?

    Hello! Bear with me - i'm an old time pro at iMovie (1, 4, 5, and 6), and have just upgraded to FCE HD. As in, loaded it up 6 hours ago! So, why did I upgrade? I'm pushing the outer limits of iMovie - particuarly with titles, transitions, small video

  • Unable to read contents of SOA server in jDeveloper

    I am trying to add a new Application Server resource in jDeveloper. I have done so on one machine without problems Windows XP jDeveloper : ADF Business Components     11.1.1.61.92 Java(TM) Platform     1.6.0_24 Oracle IDE     11.1.1.6.38.61.92 SOA Co

  • Wireless Messaging From Servlet

    Can I send wireless messages from a servle using Wireless Messaging API ??? I have a little test (taken from http://jan.netcomp.monash.edu.au/internetdevices/wireless/wma.html). There's a client that send messages, and a server that listens for incom

  • 10g: 3 problems

    My over-all impression is that the JDev team has done a very good job with this version. It contains lots of usefull improvements. Here are some problems I have noticed: 1) The filechooser is some times really slow, when I browse the file system. I a

  • Error -1074395395 occurred at IMAQ Match Color Pattern after merge programs

    Dear all I  have 2 separate programs that use same source image (red01a1.jpg). The first find location of color particles (color location 01.vi) and second find location of particles after threshold  color image (particle location 01.vi).  Both of th