Oracle Prepared Statement - 8.1.7 JDBC type II Driver

Hi,
I have a strange problem.
I do a query using a prepared statement and there are no matching results.
I change this to hardcoded SQL Statement and pass in the same value a row of record is returned
I change this to Statement and pass in the input a row of record is returned.
This is puzzling. There seems to be a problem with Prepared Statement and I can't see why that fails.
The Stmt looks like this
PreparedStatement id is defiend as a char in the database
Code Snippet:
SQL = Select * from employee where id = ?;
pstmt.setString(1,'value');
Hardcoded SQL:
select * from employee where id = 'value';
Statement Impl:
String var = "value";
"select * from employee where id = '" + var+ "'";
Would appreciate if somebody can explain what's happening. To me it is bizarre!
Thanks,
Manglu

Update to problem
I have the latest (classes12.zip) JDBC drivers from Oracle.
We are running Oracle 8.1.6 and converting to Oracle 8.1.7.
This works the same with both.
Example, I have a column (char(10)) with trailing spaces. i.e. '39 '.
When I perform a Prepared Statement with that column in the where clause, it returns no result rows.
When I perform a standard statement with that column in the where clause, it returns rows.
When I define a column char(2) and use it in the where clause it works fine.
When I define a column varchar2(10) and load it with data like '39', it works fine.
When I define a column varchar2(10 and load it with data like '39 ', it does not work.
When I execute this same Prepared Statement through the jdbc:odbc bridge it works fine.
I cannot change the definition of the columns as they are foreign key data. What is the problem here? Any help is appreciated.
If you need further information please feel free to contact me.

Similar Messages

  • Db2 - bea jdbc type 4 driver error - cursor not in a prepared state

    Hi
    I am getting this error from BEA DB2 Driver in weblogic console.
    java.sql.SQLException: [BEA][DB2 JDBC Driver][DB2]CURSOR C02 NOT IN A
    PREPARED STATE
    This problem occurs frequently almost everyday.
    When this error happens we clear the statement cache by logging in to the weblogic console (which clears the cache of prepared and callable statements maintained for each connection in the connection pool), and will be able to proceed till the error comes up again!
    Has anyone come across this type of error?
    DB2 UDB V8.1 Fixpack 4 on Solaris
    Weblogic V8.1 SP2
    Thanks
    Sireesh.

    We have seen that error as well. When using entity beans, we could do some creates, but then we would get the Cursor error. It would happen sporadically.
    IBM now has better Type 4 drivers with version 8.2, we are having better luck with them then with the BEA drivers.

  • Oracle Prepared Statement and spaces in field

    I have a field that is defined as char(10). It has characters like '39' in it. When I select against it using standard SQL (where clause) I get results. When I use it in the where clause of a prepared statement it does not return any rows.
    If I have the field defined as char(2) the prepared statement works.
    If I have the field defined as varchar2(10) and loaded with '39' the prepared statement works.
    If I have the field defined as varchar2(10) and loaded with '39 ' the prepared statement returns no results.
    I really do not think this is a JDBC problem. However, since Oracle's site basically <expletive deleted>, I am hoping someone here has a solution.
    Thanks in advance if you can help.

    Let me clarify.
    I cannot remove the whitespace from the data in the database. I do not need the whitespace to do the query if I am not using a Prepared Statement. This seems to be a problem with the way Oracle is handling the prepared statement. (hence.. my thinking that this is really not a JDBC problem at all.. but I could be wrong.)

  • Problem with Oracle Prepared Statement

    Hi all,
    Please help me..
    I Have 2 pages, in first page i had table with rows with update image for each row, when i click update it leads to 2nd page which shows the particular row information
    my problem is, i am executing prepared statement with 2 parameters in 2nd page controller which is working fine first time, when i go to first page and comes to 2nd page again my
    result set showing Null, some times query executing and getting results, some times null, i am confused with this behaviour. please help me ..
    Thanks all

    Hi ,
    How your table is being popluated ? You have executed VO in PR or PFR ?
    Please give snippet of your CO code , both after navigating from first page to second and again after coming back to first page .
    Also is same AM is retain or not ?

  • JSP Deployment:Tomcat:Oracle Prepared Statement error

    I'm deploying my BC4J JSP application to Linux/Tomcat 4.0.1.
    The html and basic jsp (Query form display) work but whenever I try to hit the database (i.e. display a browse or execute a query), I get the following in the Browser window:
    Application Error
    Return
    Error Message: oracle.jdbc.driver.OraclePreparedStatement
    There are no other messages. Everything works in the JDeveloper IDE.
    I'm sure I've done something wrong in the configuration.
    Can anyone point me in the right direction?
    TIA
    Thanks, George

    Thanks for the info Sung.
    We solved the problem late yesterday. The Tomcat documentation indicates that .jar files shared by the application and the server must reside in <Tomcat_home>/common/lib/. However, we went by the JDeveloper document which stated that most of the library files belong in <Tomcat_home>/lib/.
    When we moved classes12.jar to /common/lib/ the problem was resolved.
    In order to resolve other problems that arose, we had to move all of the indicated .jar files for JDeveloper into /common/lib/.
    One of the JDeveloper documentation folks should probably evaluate this for a change to the documentation.
    Thanks for your help!
    Thanks, George

  • Oracle Prepared Statement Class Cast exception

    I am using the TxDataSource with Oracle thin driver in WL6.1
    I get a ClassCastException when I cast the PreparedStatement
    to OraclePreparedStatement.
    It is unable to cast from weblogic.jdbc.rmi.SerialPreparedStatement.
    I am not if I can use Oracle extensions with a TxDataSource
    Thanks in Advance
    Rajesh

    Don't cast to OracleResultSet but use the WebLogic API to set/get BLOBS:
    http://edocs.bea.com/wls/docs61/oracle/advanced.html#1158561

  • Weblogic 8.1 Oracle prepared statement error

    I've got WLS 8.1SP1 running on Mac OS X (10.2.6, JDK 1.4.1) using the Oracle Thin
    driver to connect to a 9.2.0.1 db on WinXP. When I run a unit test that uses
    an XA connection, I get the error below (inside a much larger stack trace). I'm
    not getting this error with 7.0SP2 (with Mac JDK 1.3.1). Is anyone familiar with
    what the code is trying to do here?
    [junit] --------------- nested within: ------------------
    [junit] weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Failed
    to generate class for weblogic.jdbc.rmi.internal.PreparedStatementImpl_weblogic_jdbc_wrapper_PreparedStatement_oracle_jdbc_driver_OraclePreparedStatement_811_WLStub
    ] - with nested exception:
    [junit] [java.lang.reflect.InvocationTargetException - with target exception:
        [junit] [java.lang.ArrayIndexOutOfBoundsException: 142]]
    [junit] at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:807)
    [junit] at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:790)
    [junit] at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:79)
    [junit] at weblogic.rmi.utils.io.RemoteObjectReplacer.resolveObject(RemoteObjectReplacer.java:222)
    [junit] at weblogic.rmi.internal.StubInfo.readResolve(StubInfo.java:142)

    Craig,
    Normally AssertionError means that you hit the bug. Contact [email protected]
    for a resultion.
    Regards,
    Slava Imeshev
    <Craig Daniels cldanielsATcheckfree.com> wrote in message
    news:[email protected]..
    >
    I've got WLS 8.1SP1 running on Mac OS X (10.2.6, JDK 1.4.1) using theOracle Thin
    driver to connect to a 9.2.0.1 db on WinXP. When I run a unit test thatuses
    an XA connection, I get the error below (inside a much larger stacktrace). I'm
    not getting this error with 7.0SP2 (with Mac JDK 1.3.1). Is anyonefamiliar with
    what the code is trying to do here?
    [junit] --------------- nested within: ------------------
    [junit] weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[Failed
    to generate class forweblogic.jdbc.rmi.internal.PreparedStatementImpl_weblogic_jdbc_wrapper_Prepa
    redStatement_oracle_jdbc_driver_OraclePreparedStatement_811_WLStub
    ] - with nested exception:
    [junit] [java.lang.reflect.InvocationTargetException - with target
    exception:>     [junit [java.lang.ArrayIndexOutOfBoundsException: 142]]
    [junit] atweblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:807)
    [junit] atweblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:790)
    [junit] atweblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:79)
    [junit] atweblogic.rmi.utils.io.RemoteObjectReplacer.resolveObject(RemoteObjectReplace
    r.java:222)
    [junit] atweblogic.rmi.internal.StubInfo.readResolve(StubInfo.java:142)

  • How to connect to Oracel 10g on RAC setup using JDBC type 4 driver

    Hi ,
    I am using websphere 5.1.1.0 server as my application server .Can some one please enlighten me on how can I configure my data source for 10g on RAC ( not stand alone ) . Rather I would like how different is it from configuring data source for a standalone database .

    Hi,
    Maybe this example cut will work for you. It passes and gets
    string:
    Statement stmt = conn.createStatement ();
    CallableStatement cs = conn.prepareCall ("begin ? :=
    MyFunction(?); end;");
    cs.registerOutParameter(1,Types.CHAR);
    cs.executeUpdate();
    System.out.println (cs.getString(1).trim());
    Robertas
    Sudhir Kulkarni (guest) wrote:
    : How to call Stored Functions from Oracle.. Does JDBC allow
    this
    : to do..
    : Callable Statement allows only Stored Procedures.
    : Does It allow to invoke Database Functions..
    : Pl. Explain is there any other way to invoke Database
    Functions..
    : Thanks in Advance,
    : Sudhir Kulkarni
    null

  • JDBC Type 3 driver problem with WLS 6.1 SP4

    We have Oracle 8.1.7.4 client running on WebLogic 6.1 SP4 on Solaris 2.6 connecting to Oracle OPS 8.1.7 running on Solaris 2.6. We are getting core dumps while running stress testing using Load Runner for 100 concurrent users. The performance is very good for a while in the beginning of the test and all of a sudden we see requests for connections queueing up on the WLS and the server crashes. Please send us details of any previous instances any one faced similar problem and the fix applied will be very helpful.
    Regards,
    Raj

    The Member Feedback forum is for suggestions and feedback for OTN Developer Services. This forum is not monitored by Oracle support or product teams and so Oracle product and technology related questions cannot be answered. We recommend that you post this thread to the SQLJ/JDBC forum.
    The URL is: http://forums.oracle.com/forums/forum.jsp?forum=99
    Thanks, OTN Team

  • Help: Connecting Tomcat to CA-IDMS Using JDBC Type 4 Drivers (JNDI)

    Hi there,
    I have a rather interesting / complex problem......creating a connection to CA-IDMS from Tomcat using JDBC type 4 drivers (CA provide the type 4 driver).
    We have a zSeries 9 IBM mainframe running CA-IDMS r16.1, and I need to connect to the IDMS from Tomcat (running on Linux) using the JDBC Type 4 drivers provided by CA.
    At this stage I am struggling with the actual setup and configuration of Tomcat’s server.xml and web.xml files. These are the files where the JDBC configuration is set (I think). I have to setup the CA-IDMS part of the configuration, but that is a different problem. Basically there is a TCP/IP listener on the IDMS, waiting for incoming connections from the JDBC type 4 driver.
    I set up a Tomcat to MySQL connection using MySQL Connector / J, which is a similar kind of process to what I am trying to achieve with IDMS. MySQL connector / J came with a jar file which is placed in Tomcat’s lib folder, and then the JDBC setup for the web application is created in Tomcat's server.xml and web.xml files. You can then connect to the MySQL database using JSP and the configured JDBC driver / connection. The CA-IDMS Server comes with an idmsjdbc.jar file, which I think is the JDBC typr 4 driver. I think it needs to be placed in the Tomcat /lib folder, but I don’t know how to set up the configuration.
    There is a JDBC DriverManager which allows JDBC drivers to connect to CA-IDMS. The DriverManager recognises the following syntax:
    jdbc:idms://hostname:port/database
    This allows the JDBC driver running within Tomcat to connect to the IDMS which is running on the IDM mainframe. CA IDMS r16 supports direct connections from the Type 4 JDBC driver to the Central Version on IDMS. "hostname" is the DNS name or IP address of the machine where the CV is running, and "port" is the IP port that was specified for the listener PTERM (setup on the IDMS side).
    There is a caidms.properties file for the JDBC driver, which is used to specify user ID, password, and optional accounting information. It can also be used to specify physical connection information, allowing an application to connect to a CA-IDMS database without requiring the definition of an ODBC style data source. However, I don’t know where to place this file within the Tomcat setup.
    There is also an IdmsDataSource class. I don’t know where to configure this or how to set it up; the CA-IDMS Server manual states the following:
    This class implements the JDBC DataSource interface. It is used with an application server (Tomcat) providing Java Naming and Directory Interface (JNDI) naming service to establish a connection to a CA IDMS database. IdmsDataSource properties conform to the Java Beans naming conventions and are implicitly defined by public “setter” and “getter” methods. For example, the “description” property, which is required for all DataSource implementations, is set using the setDescription(String) method. The application server may use the java.lang.reflection methods to discover DataSource properties and provide an interface to set them, or may simply require that they are defined in some configuration file. IdmsDataSource properties are used to specify the connection parameters. These properties are the equivalent of the DriverPropertyInfo attributes described in the previous section and can be used to completely define the parameters needed to connect to a database. Like a URL, an IdmsDataSource object can also reference an “ODBC” style data source name, where the connection parameters are defined in the configuration file on Linux.
    Is there anyone that can try to point me in the right direction to setting up the JDBC connection? I am totally new to Java and so the instructions are not making much sense at the moment. Any help, hints, tips…..anything will be greatly appreciated as I have just hit a brick wall here. I can't find much to do with setting up the CA-IDMS Server JDBC type 4 driver online either....if anyone can point me to some resources that would also be extremely useful.
    Kind regards
    Jp

    You say you've managed to get the JDBC driver working
    in an application but not in a JSP. You also say that
    the error you get is
    "com.microsoft.jdbc.sqlserver.SQLServerDriver".
    I'd be willing to bet that the exception that you have
    got is a ClassNotFoundException. I.E. your application
    server hasn't found the JDBC driver classes. The
    application server probably doesn't use your current
    CLASSPATH to look for classes. It will be setup within
    the application server in some way and you'll need to
    check your app server documentation to see how it is
    done.
    Try replacing
    e.printStackTrace();with
    e.printStackTrace(out);to get a full stack trace of your error.
    ColTried it. Got this error when I tried to run the JSP.
    Incompatible type for method. Can't convert javax.servlet.jsp.JspWriter to java.io.PrintWriter.
              e.printStackTrace(out);
    I'm currently using Apache Tomcat 4.0.3 as my JSP/Servlet Container.
    I'm also using Type 4 MS SQL Server 2000 JDBC driver version 2.0 on my NT4.0 Server.
    Do I need to set my JDBC driver in my container? if so, how do I do that?

  • Prepared statement and DELETE returns 0 count

    when executing an oracle prepared statement, the count returned is allways 0 for DELETE. However, if doing an INSERT, the count returned is correct
    public void CreatePreparePurgeRcdSetArray(String sql, int i, int max, boolean create) throws SQLException,Exception
    if (create == true)
              if (preparedStatementArray == null)
                   preparedStatementArray = new PreparedStatement[max];
              int scroll_type = getScrollType();
                   if (sql.compareTo("NOT_USED") == 0)
                        preparedStatementArray[i] = null;
                   else
                        preparedStatement          = (connClass.getConn()).prepareStatement(sql);
                        preparedStatementArray[i] = preparedStatement;
                        preparedStatement          = null;
    else
         closePrepareStatementArray(max);
    public int UpdatePreparePurgeRcdSet(Vector smry, String sqlP, int i) throws SQLException,Exception
         Object[] searchs = (Object[])smry.elementAt(0);
         /*java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
         String aaa = searchs[1].toString();
         String aab = searchs[1].toString();
         java.util.Date                     dtx = sdf.parse(aaa);
         java.util.Date                     dty = sdf.parse(aab);
         oracle.sql.DATE aa1 = new DATE(new Timestamp(dtx.getTime()));
         oracle.sql.DATE aa2 = new DATE(new Timestamp(dty.getTime()));
         java.sql.Timestamp      ts1 = (java.sql.Timestamp) searchs[1] ;
         java.sql.Timestamp      ts2 = (java.sql.Timestamp) searchs[5] ;
         boolean oracle = true;
         boolean debug = true;
              if ((oracle == true) && (debug == true))
                   String sql1 = "INSERT INTO FFI_MASTER_PURGE_TBL values ('lmill', 'OSTDEVT', 'sdsadmin', ?, 30, 60, '0', 2, 'ZZZ', ' ')";
                   String sql2 = "DELETE FROM TDSADMIN.FFI_MASTER_PURGE_TBL where FORMATCATEGORY = ?";
                   String sql3 = "DELETE from TDSADMIN.SUMMARY_TBL where (ML_STI_SRC_SYS_CD = ?) AND (ML_STI_CYCLE_CD = ?) AND (ML_STI_FILE_ID = ?)";
                   preparedStatement = (connClass.getConn()).prepareStatement(sql3);
                   //preparedStatement.setString(1, "test");
                   preparedStatement.setString(1, "618");
                   preparedStatement.setString(2, "0114200601");
                   preparedStatement.setString(3, "00001591");
                   oraclePreparedStatement = (OraclePreparedStatement)preparedStatement;
                   recsDeleted = oraclePreparedStatement.executeUpdate();
              if (oracle == true)
              preparedStatement = preparedStatementArray;
              //oraclePreparedStatement.setExecuteBatch (3);
              // ML_STI_SRC_SYS_CD
              preparedStatement.setString(1, searchs[0].toString());
                   // ML_STI_SRCSYS_DTTM
              //preparedStatement.setTimestamp(2, ts1);
              //preparedStatement.setObject(2, aa1);
              // ML_STI_CYCLE_CD
              preparedStatement.setString(2, searchs[2].toString());
                   // ML_STI_FILE_ID
              preparedStatement.setString(3, searchs[3].toString());
                   // ML_STI_LOAD_DTTM
              //preparedStatement.setTimestamp(5, ts2);
              //preparedStatement.setObject(5, aa2);
         else
                   preparedStatement = preparedStatementArray[i];
              // ML_STI_SRC_SYS_CD
              preparedStatement.setString(1, searchs[0].toString());
                   // ML_STI_SRCSYS_DTTM
              preparedStatement.setTimestamp(2, ts1);
              // ML_STI_CYCLE_CD
              preparedStatement.setString(3, searchs[2].toString());
                   // ML_STI_FILE_ID
              preparedStatement.setString(4, searchs[3].toString());
                   // ML_STI_LOAD_DTTM
              preparedStatement.setTimestamp(5, ts2);
         DateClass dateClass = new DateClass();
              String startTime = dateClass.calToFormattedDateExact();
              try
                   if (oracle == true)
                        //int batch_val = oraclePreparedStatement.getExecuteBatch();
                        oraclePreparedStatement = (OraclePreparedStatement)preparedStatement;
                        recsDeleted = oraclePreparedStatement.executeUpdate();
                        //recsDeleted = oraclePreparedStatement.sendBatch();
                   else
                        recsDeleted = preparedStatement.executeUpdate();
    catch(SQLException e)
         String err = (e.getMessage()).substring(0,e.getMessage().length()-1);
         systemClass.logSqlStatement(sqlP + " : " + err, startTime);
    throw e;
    Message was edited by:
    user539085
    Message was edited by:
    user539085
    Message was edited by:
    user539085

    user539085,
    I guess it returns 0 (zero) because it doesn't delete anything. Can you verify that it did delete some records and still returned zero?
    Good Luck,
    Avi.

  • Blob support in type 4 driver?

    Does anyone know of a JDBC type 4 driver that supports the reading/writing of Blobs to Oracle 8.1.7 using the database independent JDBC api? When the objects I'm trying to write to the db get over a certain size (approx. 4k) it starts throwing exceptions.
    I use an InputStream to pipe the data to the blob column. When the stream is over a certain size, the setBinaryStream method doesn't read the data from the stream and NULL is written to my blob column.
    I've seen examples of how to read/write blobs using Oracle specific api's. My issue is my app needs to be database independent.
    Any help of info would be greatly appreciated.
    Rich

    I got exactly the same problem. working on finding whats the problem. If you find the solution please post it here. It was working ok when I was having 1.3.1 but when I updated to 1.4 I got this problem

  • Oracle Cached Prepared Statement

    We recently upgraded from WL 8.1 SP3 to WL 9.2 and in the process updated the JDBC Driver for Oracle from 10.2.0.1 to 10.2.0.2. After we went live we started seeing issue in one table. The table contains some special character which is not suppose to be there.
    Here is the code & table details
    PreparedStatement pstmt = cn.prepareStatement("INSERT INTO INFO_TABLE(user_name,user_status) values (?,?)");
    pstmt.setString(1,requestObject.getUserName());
    if(requestObject.isValidUser)
    pstmt.setInt(2,requestObject.getStatus());
    }else
    pstmt.setNull(2,Types.VARCHAR);
    cn.commit();
    Table description:
    USER_NAME VARCHAR2(60);
    USER_STATUS VARCHAR2(5);
    - The USER_STATUS columns valid values are 0-4 or NULL.
    The problem is on certain occasions the valid user value in the table is some special character. I got the ascii value of this character as 128. We don't know yet whether setting int value and varchar (null) value on two different flow (but cached prepared statement) is the issue.
    We can fix the code to use uniform data type but we need to be sure this is what causing the problem. Further when I read the docs http://e-docs.bea.com/wls/docs90/jdbc_admin/jdbc_datasources.html
    I can associate the problem I face with this pointer however as I said, we need some sort of confirmation to make this change in the production code.
    Here is what I am specifically looking for
    1. Is there a way to confirm this problem?
    2. Can we log the prepared statement being executed and the binded value being sent to the Oracle DB?
    I suspect the VARCHAR null type is being casted to int value 128.
    Would really appreciate any pointers on this.
    Thanks

    Purushothaman Thambu wrote:
    We recently upgraded from WL 8.1 SP3 to WL 9.2 and in the process updated the JDBC Driver for Oracle from 10.2.0.1 to 10.2.0.2. After we went live we started seeing issue in one table. The table contains some special character which is not suppose to be there.
    Here is the code & table details
    PreparedStatement pstmt = cn.prepareStatement("INSERT INTO INFO_TABLE(user_name,user_status) values (?,?)");
    pstmt.setString(1,requestObject.getUserName());
    if(requestObject.isValidUser)
    pstmt.setInt(2,requestObject.getStatus());
    }else
    pstmt.setNull(2,Types.VARCHAR);
    cn.commit();
    Table description:
    USER_NAME VARCHAR2(60);
    USER_STATUS VARCHAR2(5);
    - The USER_STATUS columns valid values are 0-4 or NULL.
    The problem is on certain occasions the valid user value in the table is some special character. I got the ascii value of this character as 128. We don't know yet whether setting int value and varchar (null) value on two different flow (but cached prepared statement) is the issue.
    We can fix the code to use uniform data type but we need to be sure this is what causing the problem. Further when I read the docs http://e-docs.bea.com/wls/docs90/jdbc_admin/jdbc_datasources.html
    I can associate the problem I face with this pointer however as I said, we need some sort of confirmation to make this change in the production code.
    Here is what I am specifically looking for
    1. Is there a way to confirm this problem?
    2. Can we log the prepared statement being executed and the binded value being sent to the Oracle DB?
    I suspect the VARCHAR null type is being casted to int value 128.
    Would really appreciate any pointers on this.
    ThanksHi. I don't think there's any issue with WebLogic here, but the code you show
    might confuse some drivers. I highly recommend using setString for all
    varchar/char/varchar2 columns, not setInt(). If requestObject.getStatus()
    has to return an int, try this:
    if(requestObject.isValidUser)
    pstmt.setString(2, (""+ requestObject.getStatus()) );
    Joe

  • Prepared statement cache & Oracle

    Hi -
    Does Weblogic's prepared statement caching only work when using their
    type-2 Oracle driver? Are there any documents about using this
    Weblogic feature? I have only found small references in the Weblogic
    documentation so far -- nothing with much detail.
    Thanks for any help,
    - Mark

    "Joseph Weinstein" <[email protected]> wrote in message
    news:[email protected]..
    >
    >
    Mark Cassidy wrote:
    Hi -
    Does Weblogic's prepared statement caching only work when using their
    type-2 Oracle driver?No. It is generic to JDBC. Any JDBC driver should allow re-use ofPreparedStatements,
    and our pool will cache for any driver.
    Are there any documents about using this
    Weblogic feature? I have only found small references in the Weblogic
    documentation so far -- nothing with much detail.You are correct that there is too little documentation at this time.
    Thanks for any help,
    - Mark
    Thanks Joe!
    Do you know if each connection's cache is FIFO? Or do you use
    least-recently-used algorithm?
    I found one comment you made regarding XA pools. That means that if we are
    doing 2-phase commit processing that some of these benefits could erode? I
    didn't understand why. If we assume that the connections in a given pool
    after a time get a good sampling of popular prepared statements, would their
    being XA or not matter? Maybe I missed your point entirely.
    - Mark

  • How to use INSERT INTO ALL statement in jdbc prepared statement with beans

    Kindly give me some example that how we can use "INSERT INTO ALL STATEMENT" in jdbc prepared statement inside a jsf bean?
    Actually i want to take employee id's of present employees using single jsf page and using one textbox for each employee id.
    How can i use INSERT INTO ALL statement to achieve this?
    Following is my code snippet.
    AttendanceBean.java:
    public class AttendanceBean {
    private int atteid;
    private String attdname;
    private int attday;
    private int attmonth;
    private int attyear;
    public static Connection getAttConnection() throws Exception {
    String driver = "oracle.jdbc.driver.OracleDriver";
    String url = "jdbc:oracle:thin:@localhost:1521:globldb3";
    String username = "scott";
    String password = "tiger";
    Class.forName(driver);
    Connection conn = DriverManager.getConnection(url, username, password);
    return conn;
    public String addAttendance(){
    Connection conn = null;
    PreparedStatement pstmt = null;
    boolean committed = false;
    try {
    conn = getAttConnection();
    conn.setAutoCommit(false);
    String query = "INSERT ALL INTO attendance VALUES (?,?,?,?,?)";
    pstmt = conn.prepareStatement(query);
    pstmt.setInt(1,this.atteid);
    pstmt.setString(2,this.attdname);
    pstmt.setInt(3,this.attday);
    pstmt.setInt(4,this.attmonth);
    pstmt.setInt(5,this.attyear);
    pstmt.executeUpdate();
    conn.commit();
    conn.setAutoCommit(true);
    committed = true;
    return "home.xhtml";
    } catch (Exception e) {
    e.printStackTrace();
    return "CRM.xhtml";
    } finally {
    try{
    if (!committed) conn.rollback();
    if (pstmt != null) pstmt.close();
    if (conn != null) conn.close();
    }catch(Exception e){
    e.printStackTrace();
    }

    Check this program for some info on Push buttons:
    1-DEMO_DYNPRO_PUSH_BUTTON
    2-DEMO_DYNPRO_MODULE
    3-DEMO_DYNPRO_ON_CONDITION
    Suppose Your screen is 101
    Then in that screen create one push button and assign it a function code.
    Now in the PAI of the 101 screen
    Create Module for user command
    Inside that module checc the sy-ucomm if sy-ucomm eq <Function code of your push button>
    Insert the values in database.
    *& Module USER_COMMAND_0101 INPUT
    process after input for screen 0101 *
    MODULE USER_COMMAND_0101 INPUT.
    CASE OK_CODE.
    WHEN 'SAVE'.
    *Insert the values here
    WHEN 'DISP'.
    ENDCASE.
    CLEAR OK_CODE.
    ENDMODULE. " USER_COMMAND_0101 INPUT
    Regards
    Neha
    Edited by: Neha Shukla on Dec 3, 2008 1:02 AM
    Edited by: Neha Shukla on Dec 3, 2008 1:02 AM
    Edited by: Neha Shukla on Dec 3, 2008 1:06 AM

Maybe you are looking for

  • Sales org roll out doubt

    Dear Peers, My scenario:  CRM roll out for DE. first CRM was implmented in US and the rollout is for DE. In R3 customer no:10 has assigned to 4 diff sales org included US and DE. Now i started the Initial load for the DE customers from R3 to CRM and

  • IPod backup/ recovery files on a PC

    Where can I find my iPod backup/ recovery files on my PC (Windows XP) to delete old backup files?

  • Consecutive numbers

    I have a requirement where I have to store consecutive numbers (permanently not virtual) for customers. I can 't use a sequence hence there is a possibility of rollback, I can't produce them at application level as concurrence strucked may way. any i

  • Have macbook 13 inch, full trackpad yet gestures does not work with Lion

    Installed Lion, tried to use gestures but does not work, have macbook with full trackpad without bottoms, went to System Preferences, Trackpads, checked for all features, is there anything else I need to do?

  • Help with my eraser tool please

    I got a new laptop and installed a copy of fireworks on it. It seems to work differently on this new computer than my older one. The Eraser tool is all jittery and jumpy and will even continue on after I have released the mouse button. This sure make