SQLJ and reparsing?

My trace outputs show that when using SQLJ it seems that all
statements being used seem to be reparsed whenever they are
used (identical parse/execute/fetch counts from tkprof). Is
there any way in SQLJ to do a sort of PREPARE for e.g. e SELECT
or UPDATE and then just re-execute it, avoiding the re-parsing
overhead?
Thanks,
Erwin
null

Oracle Product Development Team wrote:
: Unfortunately NO in 8i
: But the good news is that we are working on
: Statement Caching and this feature should be available
: in 8.1.6
: Erwin Heute (guest) wrote:
: : My trace outputs show that when using SQLJ it seems that all
: : statements being used seem to be reparsed whenever they are
: : used (identical parse/execute/fetch counts from tkprof). Is
: : there any way in SQLJ to do a sort of PREPARE for e.g. e
SELECT
: : or UPDATE and then just re-execute it, avoiding the re-
parsing
: : overhead?
: : Thanks,
: : Erwin
: Oracle Technology Network
: http://technet.oracle.com
Thanks for the info. I'll be looking forward to it.
Regards,
Erwin
null

Similar Messages

  • Sqlj and jdbc for linux

    Hi All,
    I am currently set up the (tomcat) jsp engine on top of apache web server.
    And now i would like to install both sqlj and a jdbc driver such
    that I can query our oracle database. In all of the options for downloads
    there is a windoze option and a solaris option. Do I have to wait for specific
    "linux" version to get them to work. Or is the solaris option alright
    for linux ??
    slightly confused,
    Chris

    Unfortunately, this description is still rather unspecific.
    It sounds, as if there might be an issue with the way database connections are established for the SQLJ and JDBC parts of your program. Could you provide more information on that, specifically on how you obtain JDBC connections and SQLJ connection contexts.

  • Sqlj and jdbc in a single program causing problems

    I am using both sqlj and jdbc in a single program(servlets) but after insatiaitng this program my other sqlj programs are not working while the JDBC pgms are working . Why is it so? How can I remedy it?

    Unfortunately, this description is still rather unspecific.
    It sounds, as if there might be an issue with the way database connections are established for the SQLJ and JDBC parts of your program. Could you provide more information on that, specifically on how you obtain JDBC connections and SQLJ connection contexts.

  • SQLJ and JSP

    Hello,
    I have generated a sqlj wrapper class for a package, and now I want to execute a method that calls the pl/sql procedure inside the .sqlj program thru JSP. How do I do that?
    I tried <%=methodgenerated() %>, but doesn't work.
    It's a stored procedure not a function. I looked for an example and I just found the runQuery() example everywhere, but didn't find an example about running a procedure from JSP.
    I also did the steps about language="sqlj" and import.... but I need an example about doing this action.
    Could you please help me with this?
    Thanks in advance.

    I will answer myself, so people that has the same problem can see this:
    Make a jsp page (callingprogram.jsp) that calls the following file: EXECUTESQLJ.jsp (the file name could be whatever):
    -- CALLINGPROGRAM.JSP --
    <%@ page contentType="text/html;charset=windows-1252"%>
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
    <TITLE>
    jsp to execute a pl/sql (sqlj)
    </TITLE>
    </HEAD>
    <BODY>
    Ejecutar un PL/SQL es cuestion de colocar el codigo en JAVA respectivo:
    <FORM method="post" action="executesqlj.jsp" onreset="alert('LA FORMA ES REINICIADA')">
    Presione el boton --><INPUT type="submit" value="Ejecutar">
    <BR>
    Para Reiniciar valores presione ---> <INPUT type="reset" value="Reiniciar"></TD>
    </FORM>
    </BODY>
    </HTML>
    Then, the file EXECUTESQLJ.JSP should has a look like this:
    <%@ page language="sqlj"
    contentType="text/html;charset=windows-1252"
    import="oracle.jbo.*,
    java.sql.SQLException,sqlj.runtime.ref.DefaultContext,
    sqlj.runtime.ConnectionContext,java.sql.Connection,
    oracle.sqlj.runtime.Oracle,mypackage1.java2" %>
    <-- mypackage1.java2 is the wrapper sqlj that the JDEV has created with the option GENERATE JAVA... -->
    <HTML>
    <HEAD>
    <TITLE>
    Executing sqlj....
    </TITLE>
    </HEAD>
    <BODY>
    <% // Codificacion de Java para llamar el procedimiento.
    Oracle.connect(new java2().getClass(), "connect.properties");
    <% /* remember creating the file connect.properties in your package directory
    The file has to be like this:
    sqlj.url=jdbc:oracle:thin:@servidor:1521:ORCL
    # User name and password here (edit to use different user/password)
    sqlj.user=scott
    sqlj.password=tiger
    */ %>
    java2 execsql = new java2();
    execsql.testjava();
    %>
    <jsp:forward page="callingprogram.jsp" />
    </BODY>
    </HTML>
    Hope this could help the jdevs guys!.

  • Performance difference between sqlj and jdbc

    hi:
    i am working with a project and i have to generate text files
    from database . first i am working with pl/sql, but i am not so
    satisfied with the performance. so i turn to java stored procedure. I have two choice sqlj and jdbc when accessing
    database? which performs better? sqlj or jdbc? or there's only
    little difference.
    And would u like to give me some other choice to run faster.
    maybe pro*c/c++ is a choice . but if it can't run much faster ,
    it's not a better choice.
    regards

    Since you don't play games, you'll notice a difference in graphic and video applications that are GPU accelerated, like Motion, and Photoshop CS4 & 5.

  • JDev9033, SQLJ and Ant

    Hi, can anybody help me with this?
    In this project we use JDev9033, JDK1.4.2_02, SQLJ, Ant1.54 and Oracle 9.2.0.1 client. Now I have a problem integrating OJC and Ant, since we want to use Ant from within JDev to build the project.
    I have set up the paths and class paths according to Oracle 9i SQLJ Developers Guide (Release 2). If I compile from JDev without Ant, JDev compiles the projects *.java and *.sqlj classes corretly.
    I have set the build.properties and build.xml file according to the paths specified in the build.xml file, which JDev can generate for me. And I have included jdev.jar and ojc.jar in the class path.
    Any way I get the exception with the -debug flag set i Ant:
    BUILD FAILED
    file:D:/JDev/GCSSMLIS/Tests/build.xml:166: Compiler Adapter 'oracle.jdeveloper.compiler.ant.teskdefs.OjcAdapter' can't be found.
         at org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.resolveClassName(CompilerAdapterFactory.java:195)
    In build.properties I have:
    # COMPILATION SETTINGS
    compiler=oracle.jdeveloper.compiler.ant.teskdefs.OjcAdapter
    source="1.4"
    target="1.4"
    deprecation="on"
    optimize="off"
    debug="on"
    optimize=off
    and in build.xml:
    <javac
    compiler="${compiler}"
    srcdir="${comp.dir}"
    destdir="${build.dir}"
    includes="**/*.java, **/*TEST*.java, **/Test*.java"
    >
    <classpath refid="classpath" />
    </javac>
    with classpath:
    <path id="classpath">
    <fileset dir="${javac.path}" >
    <include name="*.jar" />
    </fileset>
    <fileset dir="${jdev.home}/sqlj/lib" >
    <include name="*.jar" />
    </fileset>
    <pathelement location="${jdev.home}/jdev/lib/jdev.jar" />
    <pathelement location="${jdev.home}/jdev/lib/ojc.jar" />
    <pathelement location="${ora.home}/jdbc/lib/ojdbc14.jar" />
    <pathelement location="${ant.path}/optional.jar"/>
    <pathelement location="${junit.path}/junit.jar" />
    </path>
    Regards
    Flemming

    Matthew,
    Thank for your replies. I manages to get rid of the Ant error by using the first method. I would expect the second to work to.
    I do not expect the OjcAdapter to translate the sqlj files into java files. I have read those chapters in the SQLJ Developers Guide.
    I would like to do obtain is the following:
    1) Use Ant as build system. I do not care, if Ant is external or internal to JDeveloper since both version are 1.5.3. But we have a lot of other steps like ftp to development server, running JUnit, updating CVS and VSS, documentation and so on, so I need Ant to make one build file that every body in the project can use.
    2) Use jre/sdk 1.4.2, sqlj and Oracle client 9.2.0. So I have to translate the projects sqlj files to x.generate.java files before I pass all projects files to a Java compiler.
    3) I tried to build an Ant precompile task in this way:
    a) copy all java and sqlj files from src directory to compile directory.
    b) From the Ant task run the sqlj translator on the compile directory
    c) pass the translated files to javac or ojc
    Since I can translate and compile the project with jdsk1.4.2 from the Jdev Make/Recompile menu point I assume I should be able to write Ant tasks to behave as I have want it to.
    Flemming

  • JAR files for SQLJ and JDBC drivers: what is the best practice?

    starting a migration from IAS 10 to WebLogic 11g.
    Apparently the jar files for SQLJ are not on the classpath by default.
    java.lang.NoClassDefFoundError: sqlj/runtime/ref/DefaultContextwhich is the better practice: putting the SQLJ runtime jar into the lib subdirectory of the domain directory, or using a shared library reference? (usage of SQLJ is pretty prevalent in our apps, though we may be getting away from it)
    are the Oracle JDBC drivers on the classpath by default?
    if not, then the same question: put them into the lib subdirectory of the domain directory, or use a shared library reference?

    I'm looking at the setDomainEnv, especially the big note at the top:
    >
    # WARNING: This file is created by the Configuration Wizard.
    # Any changes to this script may be lost when adding extensions to this configuration.
    >
    and am getting squeamish about editing it...
    http://www.bea-weblogic.com/how-do-i-disable-wls-automatically-adding-to-classpath.html looks like the default behaviour is for WebLogic to put $DOMAIN/lib;$WL_HOME/common/lib/ext;$WL_HOME/server/lib/ext on the classpath; there is also a reference to setting weblogic.ext.dirs= when starting weblogic (which means I set the WEBLOGIC_EXTENSION_DIRS environment variable).
    http://download.oracle.com/docs/cd/E12840_01/wls/docs103/programming/libraries.html#wp1067450 also refers at the bottom to using the domain /lib subdirectory.
    so am I correct that a good practice is to just put the jars I think I will globally need into $DOMAIN/lib, rather than putting them in $WL_HOME/common/lib/ext, $WL_HOME/server/lib/ext, or fiddling with the WEBLOGIC_EXTENSION_DIRS environment variable?
    Edited by: user8652010 on Feb 10, 2011 1:08 PM

  • SQLJ and Java Stored Procedures

    Hi,
    Am very sorry, if I am taxing you too much with Java Stored Procedures!!
    However, I have struggling with it for more than 3 days or so.So please bear with me
    I am facing a peculiar problem on the subject.
    I have deployed a Java Stored Procedure using Connection name as "JDBC" through JDev.
    My client calls the Stored procedure getDept as follows:
    int deptNo = 0;
    String deptName = null,
    deptLoc = null;
    #sql {
    call sample.getDept( :out deptNo,
    :out deptName,
    :out deptLoc)
    In my project properties , in SQLJ tab, when I select "JDBC" as my connectionName, and leave the ContextName blank(i.e. DefaultContext), I get the following error :
    Error: [26] Not Found: SAMPLE.GETDEPT There is no stored procedure with this name
    When I leave the ConnectionName as blank (which I suppose means donot do online checking!!), it compiles OK.
    Howvever, it is not able to run my SQLJ file!!
    Cannot figure out why this is happening.Please help!!
    TIA
    Sandeep
    null

    Looks like Java stored procedure don't support the return of result sets to the client. Given the complexity and non-generic 'cursor ref' approach that Oracle has always implemented, I guess it is not too surprising. I suggest throwing the select into a work table and pulling the rows from there. If you are in a COM capable environment, you can use 0040 to get back a Dynaset, but be aware, it is live!
    Good luck.
    Cal

  • JDeveloper, SQLJ, and SQL Server

    I am trying to use JDeveloper to write SQLJ code to connect to a SQL Server database using the JTurbo driver (part of a benchmark). Everyting works great form the command line, but (1) JDeveloper can not find the driver (despite the fact that it is in the setvars and in the projects classpath), and (2) the executable JVM can not find the .ser files (again most likely a CLASSPATH issue).
    Any thoughts are appreciated.

    upto my knowledge the SQLJ is oracle specific. Because the SQLJ classes needs Aurora Virtual Machine, available only in Oracle server, to execute its classes or to get connected to the database.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by rb:
    I am trying to use JDeveloper to write SQLJ code to connect to a SQL Server database using the JTurbo driver (part of a benchmark). Everyting works great form the command line, but (1) JDeveloper can not find the driver (despite the fact that it is in the setvars and in the projects classpath), and (2) the executable JVM can not find the .ser files (again most likely a CLASSPATH issue).
    Any thoughts are appreciated.<HR></BLOCKQUOTE>
    null

  • Again and again : CLOB,SQLJ and JDEV 2.0 (BUG!!!)

    It's the same message than before but with more informations for
    jdev. Team
    I use this version of ORACLE (Evaluation version):
    Oracle8 Enterprise Edition Release 8.0.5.0.0 - Production
    PL/SQL Release 8.0.5.0.0 - Production
    CORE Version 4.0.5.0.0 - Production
    TNS for 32-bit Windows: Version 8.0.5.0.0 - Production
    NLSRTL Version 3.3.2.0.0 - Production
    I'm beginning to develop this project with JDeveloper 1.1
    (Evaluation version) and now, i continue this project with jdev
    2.0 Beta.
    With Jdev. 1.1 , I can compile "with Warning" and when i launch
    It, It's the Crach. (It's an Datatype message Error)
    With Jdev 2.0 Beta, I cannot compile.
    After reading the ORACLE DOCUMENTATION about using of CLOB in a
    SQLJ file, i try this:
    package Pack_ConnexionOracle;
    import sqlj.runtime.*;
    import sqlj.runtime.ref.*;
    import java.sql.*;
    // Importing the Oracle Jdbc driver package makes the code more
    readable
    import oracle.jdbc.driver.*;
    public class OraCrit
    public OraCrit(String Surl,String Susr,String Spwd)
    try
    DriverManager.registerDriver(new
    oracle.jdbc.driver.OracleDriver());
    DefaultContext.setDefaultContext(new DefaultContext
    (Surl,Susr,Spwd));
    catch(Exception ex)
    ex.printStackTrace();
    public String SQLRecupRequeteSQL(int iNumQuery) throws
    SQLException
    long lLongSQL;
    OracleClob ORARequeteSQL;
    String sRequeteSQL = new String();
    #sql { select requete_sql into :ORARequeteSQL from requete where
    num_query=:iNumQuery };
    #sql lLongSQL={values(dbms_lob.getlength(:ORARequeteSQL)) };
    #sql { call dbms_lob.read
    (:ORARequeteSQL,:lLongSQL,0,:sRequeteSQL) };
    return(sRequeteSQL);
    at the line 61:
    #sql { select requete_sql into :ORARequeteSQL from requete where
    num_query=:iNumQuery };
    I have this compilation error:
    Error:(61) Liste of links Variables INTO...Prohibited: illegal
    expression
    at the line 62:
    #sql lLongSQL={values(dbms_lob.getlength(:ORARequeteSQL)) };
    I have this compilation error:
    Error:(62) The Java type doesn't exist for the host element n 1..
    at the line 63:
    #sql { call dbms_lob.read
    (:ORARequeteSQL,:lLongSQL,0,:sRequeteSQL) };
    Same message than at line 62.
    Is it possible to use a CLOB in SQLJ with JDeveloper 2.0 Beta?
    HELP ME PLEASE,
    Thanks a lot.............
    null

    David,
    I think the problem is that the code you have written is for the
    8.0.5 JDBC driver (the default driver for JDev 1.1). By default,
    JDeveloper 2.0 uses the 8.1.4 JDBC driver and there are some
    syntax/API changes for LOB support between 8.0.5 and 8.1 (namely
    that OracleClob is replaced by oracle.sql.CLOB).
    Also, while you can still use the DBMS_LOB package, there are new
    methods provided in the oracle.sql package that allow more direct
    access to LOBs.
    You have two options:
    1. switch your driver to use JDBC 8.0.5
    2. switch your code to use the new 8.1 JDBC APIs
    1. Switch your driver version:
    a. For the project you are workin on, select Project->Project
    Properties from the menu
    b. Look in the Java Libraries list box. You want to see Oracle
    8.0.5 JDBC listed BEFORE Oracle 8.1.4 JDBC AND Oracle EJB. I
    don't have immediate access to Jdev right now, so I'm not
    positive what the libraries were called.
    If Oracle JDBC 8.0.5 is not listed at all, click the Add button,
    select the Oracle JDBC 8.0.5 library and add it to the list, then
    select it and drag it up so it is above the other two I
    mentioned.
    c. Exit from JDeveloper and edit the jdeveloper.ini file in your
    <JDEV_HOME>/bin directory. Make sure
    ..\jdbc\lib\oci8\classes111.zip appears in the IDE_CLASSPATH
    setting before ..\aurora\lib\classes111.zip (8.1.4 JDBC).
    2. Switch your code to use the new 8.1 JDBC APIs
    a. you will need to import oracle.sql.*
    b. change 'OracleClob' to 'CLOB'
    c. to read from the CLOB locator (you can still use DBMS_LOB, but
    there are new methods as well):
    char stream:
    //Read CLOB data into Reader char stream
    Reader char_stream = the_clob.getCharacterStream();
    char [] char_array = new char[10];
    int chars_read = char_stream.read (char_array, 0, 10);
    //Read CLOB data into Input ASCII character stream
    Inputstream asciiChar_stream = the_clob.getAsciiStream();
    byte[] asciiChar_array = new byte[10];
    int asciiChar_read =
    asciiChar_stream.read(asciiChar_array,0,10);
    The above examples are from the JDBC 8.1.5 User's Guide and
    Reference.
    Here is one from the 8.1.5 SQLJ doc:
    void readFromClob (CLOB clob) throws SQLException
    long clobLen, readLen;
    String chunk;
    clobLen = clob.length();
    for (long i = 0; i< clobLen; i+= readLen) {
    chunk = clob.getSubString(i,10);
    readLen = chunk.length();
    System.out.println("Read " + readLen + " chars: " + chunk);
    -L
    David DUPONT (guest) wrote:
    : It's the same message than before but with more informations
    for
    : jdev. Team
    : I use this version of ORACLE (Evaluation version):
    : Oracle8 Enterprise Edition Release 8.0.5.0.0 - Production
    : PL/SQL Release 8.0.5.0.0 - Production
    : CORE Version 4.0.5.0.0 - Production
    : TNS for 32-bit Windows: Version 8.0.5.0.0 - Production
    : NLSRTL Version 3.3.2.0.0 - Production
    : I'm beginning to develop this project with JDeveloper 1.1
    : (Evaluation version) and now, i continue this project with jdev
    : 2.0 Beta.
    : With Jdev. 1.1 , I can compile "with Warning" and when i
    launch
    : It, It's the Crach. (It's an Datatype message Error)
    : With Jdev 2.0 Beta, I cannot compile.
    : After reading the ORACLE DOCUMENTATION about using of CLOB in a
    : SQLJ file, i try this:
    : package Pack_ConnexionOracle;
    : import sqlj.runtime.*;
    : import sqlj.runtime.ref.*;
    : import java.sql.*;
    : // Importing the Oracle Jdbc driver package makes the code more
    : readable
    : import oracle.jdbc.driver.*;
    : public class OraCrit
    : public OraCrit(String Surl,String Susr,String Spwd)
    : try
    : DriverManager.registerDriver(new
    : oracle.jdbc.driver.OracleDriver());
    : DefaultContext.setDefaultContext(new DefaultContext
    : (Surl,Susr,Spwd));
    : catch(Exception ex)
    : ex.printStackTrace();
    : public String SQLRecupRequeteSQL(int iNumQuery) throws
    : SQLException
    : long lLongSQL;
    : OracleClob ORARequeteSQL;
    : String sRequeteSQL = new String();
    : #sql { select requete_sql into :ORARequeteSQL from requete
    where
    : num_query=:iNumQuery };
    : #sql lLongSQL={values(dbms_lob.getlength(:ORARequeteSQL)) };
    : #sql { call dbms_lob.read
    : (:ORARequeteSQL,:lLongSQL,0,:sRequeteSQL) };
    : return(sRequeteSQL);
    : at the line 61:
    : #sql { select requete_sql into :ORARequeteSQL from requete
    where
    : num_query=:iNumQuery };
    : I have this compilation error:
    : Error:(61) Liste of links Variables INTO...Prohibited: illegal
    : expression
    : at the line 62:
    : #sql lLongSQL={values(dbms_lob.getlength(:ORARequeteSQL)) };
    : I have this compilation error:
    : Error:(62) The Java type doesn't exist for the host element n
    1..
    : at the line 63:
    : #sql { call dbms_lob.read
    : (:ORARequeteSQL,:lLongSQL,0,:sRequeteSQL) };
    : Same message than at line 62.
    : Is it possible to use a CLOB in SQLJ with JDeveloper 2.0 Beta?
    : HELP ME PLEASE,
    : Thanks a lot.............
    null

  • Sqlj and JDBC test

    I installed JDK1.2.2, it works very well. I also installed
    JDBC7.3.4 and SQLJ7.3.4. After I compiled the
    TestInstallCreateTable.java, I run the class to get the following
    error messages. Can SQLJ7.3.4 work with the JDK1.2.2?
    Exception in thread "main" java.lang.UnsatisfiedLinkError:
    C:\ORAWIN95\BIN\oci73jdbc.dll: One of the library files needed to
    run this application cannot be found
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at
    java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1319)
    at
    java.lang.ClassLoader.loadLibrary(ClassLoader.java:1243)
    at java.lang.Runtime.loadLibrary0(Runtime.java:470)
    at java.lang.System.loadLibrary(System.java:768)
    at
    oracle.jdbc.oci7.OCIDBAccess.logon(OCIDBAccess.java:138)
    at
    oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:
    93)
    at
    oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:146)
    at
    java.sql.DriverManager.getConnection(DriverManager.java:457)
    at
    java.sql.DriverManager.getConnection(DriverManager.java:137)
    at
    sqlj.runtime.ref.ConnectionContextImpl.<init>(ConnectionContextIm
    pl.
    ava:102)
    at
    sqlj.runtime.ref.DefaultContext.<init>(DefaultContext.java:142)
    at
    oracle.sqlj.runtime.Oracle.getConnection(Oracle.java:501)
    null

    Thank you for your timely help. After setting up %JAVA_HOME%\lib\classes.zip in classpath, I am able to compile the .sqlj file. But I am not able to run. I get a java.lang.NoClassDefFoundError:oracle.sqlj.runtime.Oracle. I am able to see this class in the database, under Java classes. Kindly advice. Thanks in advance.

  • Jdeveloper, SQLJ and connection manager

    Hello,
    My question is wether it is possible (and if yes how), to use the connection manager within JSP and SQLJ pages, without using the Bussiness Components.
    At this moment the sqlj or jsp program gives a class not found fault. I do not know how to get or where to find the connectionmanager class.

    Yes it is possible. The connectionManager classes are in "connectionmanager.zip" in the /lib directory under where JDeveloper is installed. The library is "Connection Manager" within the JDeveloper IDE.
    Hope this helps,
    Rob
    null

  • SQLJ and jdevj2ee1013

    I installed the full version of JDeveloper 10.1.3, and attempted to compile a simple program and received the following errors:
    Error(18,15): cannot access class oracle.jdbc.OraclePreparedStatement; file oracle\jdbc\OraclePreparedStatement.class not found
    Error(18,20): cannot access class sqlj.runtime.ref.DefaultContext; file sqlj\runtime\ref\DefaultContext.class not found
    Error(18,138): cannot access class sqlj.runtime.error.RuntimeRefErrors; file sqlj\runtime\error\RuntimeRefErrors.class not found
    Error(18,33): cannot access class sqlj.runtime.ExecutionContext.OracleContext; file sqlj\runtime\ExecutionContext\OracleContext.class not found
    It was my understanding that installing the full version had all the hooks in place, so what is missing??
    thanks
    michael

    It is there, you just didn't indicate to your project to use it.
    Double click you project to go to project properites.
    In the Libraries node click add library and choose Oracle JDBC from the list.
    This should solve the problem.

  • Sqlj and infobus components

    Hi,
    I am doing a form with infoswing components. I would like to
    fetch some data from the database to validate some of the inputs,
    for which I want to use sqlj. I have already connected to the
    database using the infoswing LoginDialog box and the
    ConnectionManager set through the IDE. For using sqlj I need the
    DefaultContext. How can I get the DefaultContext for the existing
    connection. Whichever way I tried, it was prompting me for the
    username, password and role. I am really in a mess with this
    problem. Can anyone help please.
    Thanks a lot.
    --Murali
    null

    Hi
    Thanx for the reply. I tried it and failed to get result.
    Here is the code
    void BR_CODEMasterCol_validateAttribute(ValidationEvent e) throws
    ValidationException {
    RowsetAccess ra = (RowsetAccess) e.getDataItem();
    DbAccess db = ra.getDb();
    String fval =
    ((ImmediateAccess)e.getDataItem()).getValueAsString();
    RowsetAccess nra = null;
    try {
    nra = (RowsetAccess) db.executeRetrieval(
    "select 'x' as \"n_val\" from brand where br_code = 'GO'",
    "infobus:/oracle/Session1/n_val",
    null );
    ImmediateAccess nv = null;
    // nv = (ImmediateAccess)nra.getColumnItem("n_val");
    String ival =
    ((ImmediateAccess)nra.getColumnItem("val")).getValueAsString();
    if (ival == "x")
    JOptionPane.showMessageDialog(this,"It is already
    there","warning",1);
    catch (ColumnNotFoundException ex) {
    JOptionPane.showMessageDialog(this,ex.getMessage(),"warning",1);
    catch (DuplicateColumnException ex) {
    JOptionPane.showMessageDialog(this,ex.getMessage(),"warning",1);
    catch (SQLException ex) {
    JOptionPane.showMessageDialog(this,ex.getMessage(),"warning",1);
    finally {
    JOptionPane.showMessageDialog(this,"Came here
    finally","info",2);
    I wanted to check the brand code entered is already avaialable or
    not. (How to pass the entered code to the query is not clear to
    me. So I am using a hard coded value). When I run this I get an
    error like this.
    DAC-An unexpected exception occurred during validation.: 1000
    oracle.dacf.dataset.ImmediateAccessImpl
    What is the reason for this.
    Is there any possibility of getting the infobus jdbc connections
    to the outside world in future. For this kind of problems I find
    sqlj the ideal solution. But if I start using a new connection
    for that I'll be compromising on the read consistancy of the
    data.
    Thanx,
    --Murali
    JDev Team (guest) wrote:
    : The jdbc connection used by the InfoProducer objects is not
    : generally available for use by other objects. Have you explored
    : ways of accomplishing your objective by using the available
    : InfoBus APIs? For example, arbitrary SQL statement is possible
    : via the InfoBus API. The documentation in HTML is available in
    : doc\infobus.zip. There is also sample code in the AcmeVideo
    : Cashier application in
    : samples\acmevideo\infoswing\ViewMembersForm class. The
    : ACME_MEMBERSIter_rowAdded method creates and excecutes an adhoc
    : query.
    : - PSW
    : Murali Ganesh (guest) wrote:
    : : Hi,
    : : I am doing a form with infoswing components. I would like to
    : : fetch some data from the database to validate some of the
    : inputs,
    : : for which I want to use sqlj. I have already connected to the
    : : database using the infoswing LoginDialog box and the
    : : ConnectionManager set through the IDE. For using sqlj I need
    : the
    : : DefaultContext. How can I get the DefaultContext for the
    : existing
    : : connection. Whichever way I tried, it was prompting me for
    the
    : : username, password and role. I am really in a mess with this
    : : problem. Can anyone help please.
    : : Thanks a lot.
    : : --Murali
    null

  • SQLJ and "Unable to instrument

    The file ProclaimAgent.sqlj uses a static (Singleton) class
    called SpotCache contained in another package. The
    class is referenced as a class field :
    com.lenfest.radius.business.SpotCache spotcache = null;
    and in the class constructor :
    spotcache = com.lenfest.radius.business.SpotCache.getInstance();
    and in method calls :
    Spot spot = spotcache.getSpot(spotid);
    The trouble is that sqlj errors out with the following:
    "Unable to instrument SpotCache.class: SpotCache.class
    No instrumentation: class already instrumented."
    Now this is not a problem entirely, as it correctly produces
    the class file. However, the error code returned
    causes "make" to go abort the make.
    What to do ?
    null

    Hi, try this:
    For the sake of security, recommendations say to have unique, complex passwords. Most people have a hard time remembering these and will eventually forget one. Forgetting the root password on a Mac system can seem devastating, but this recipe will show an easy way to recover.
    If you have the password to an account that is an administrator on the system, then it is easy to recover the password using the sudo command. Open a terminal window and type:
    sudo passwd root
    and you will be prompted for your password (the user account that you do remember). Then you will be prompted for the new root password twice. That's it!
    The sudo command is a wonderful way to control who can do what on a system. In this case, since the user account is considered an administrator, the sudo command allows you (after confirming that you are who you say you are with the user password) to run a command as if you were root. The command we are running is passwd root which is the command to change the password for the root user.
    If you do not have an administrator password, either, you can still reset the root password. Boot the system from the Mac OS X installation CD and select the Reset password option from the installer screen and follow the directions.

Maybe you are looking for

  • ALV colouring download to excel sheet

    Hi Experts , I have a requirement in which I have coloured the cells of the ALV display , in order to highlight them. I have made use of 'REUSE_ALV_GRID_DISPLAY' FM for displaying ALV. When I  download this output to an excel sheet , the colour fille

  • Web DynPro ABAP - Disable a entire row in the Table of the output.

    Hi Web Dynpro Experts, Need ur Help.! I have a requirement to disable the one row of the table in web dynpro ABAP For example . my table is like Field1   Field2 A           Success B            Failure C            Failure I need to allow the User to

  • Unable to install apex listener in oracle 10g xe

    Hi, i have oracle 10g xe in my window xp pro and upgraded it to application express 4 i.e apex...after that i downloaded apex lisntener1.10. and read the documentations and confused about installing and configuring it. Because i think it require jdk6

  • Version conversion board

    LabVIEW load error code 10:VI version (5.0.1) is too old to convert to the current LabVIEW version (10.0) Could someone please convert the uploaded file to a newer version compatible with 10.0. Its very much urgent. Thanks in advance. Attachments: Ke

  • "Thumbnail" image need to be the same image as the "Hero Image?"

    When using the slide show widget does the "Thumbnail" image need to be the same image as the "Hero Image?" I would like to keep my "Hero Image" I load into the widget, but would like to change its corresponding "Thumbnail" image to a different icon.