JDBC overwrite

I am a beginner in a JDBC ..
and I need your help..
I already make the connection and it is fine..
but now If I want to save data in a table including (Time, Date,
Longitude, Latitude and speed) and I want to overwrite the exist
data in the table every 2 minutes so that the table always
contain the last recent data..
Is there any function in Oracle that enable me to do this?

I'm not sure exactly what you're trying to do here. Do you want to delete data that is older than 2 minutes?
Justin

Similar Messages

  • JBO-26061: Error while opening JDBC connection

    Hi,
    I have pasted this thread in Jdev forum for several days. But I still cannot solve this problem. The ADF application works fine in Jdev 11g's default server. After the login page, it can go to the correct jspx page. I create a new weblogic domain. Then, I deploy the ADF application to this domian. However, after the login page, it cannot go to the correct jspx page and just shows a blank page. I paste the log in this thread.
    ---------------------AdminServer.log------------part 3---------------------------------
    HTTP/1.1
    Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, /
    Accept-Language: zh-cn
    UA-CPU: x86
    Accept-Encoding: gzip, deflate
    User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET CLR 1.1.4322; InfoPath.2)
    Connection: Keep-Alive
    Cookie: JSESSIONID=pqQvK1Qp41lvrWJng2g4KmmpttQMjYcX6s33BQJJkLgDSzXzJv6M!1351922251
    ]] Root cause of ServletException.
    javax.faces.FacesException: oracle.adf.controller.ControllerException: ADFC-10001: cannot instantiate class 'com.sunz.view.wfruntime.pagebean.DaiBanBusinessBean'
    at org.apache.myfaces.trinidad.webapp.UIXComponentELTag.doStartTag(UIXComponentELTag.java:67)
    at oracle.adfinternal.view.faces.unified.taglib.layout.UnifiedToolbarTag.doStartTag(UnifiedToolbarTag.java:50)
    oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection
    java.sql.SQLException: ORA-01005: null password given; logon denied
    ---------------------AdminServer-diagnostic.log-----------------------
    2009-08-10T10:01:26.296+08:00 AdminServer ERROR] [ http://org.apache.beehive.netui.pageflow.internal.AdapterManager [tid: userId: <anonymous> ecid:
    0000IC22UOc2ZNWzLwATOA1AVrxq000000,0 APP: consoleapp ServletContainerAdapter manager not initialized correctly.
    According to Shay Shmeltzer's blog (http://radalcove.com/blog/?p=34) and step 25.3.1.3 of http://download.oracle.com/docs/cd/E12839_01/webcenter.1111/e10148/jpsdg_deploy.htm
    , I add:
    set EXTRA_JAVA_PROPERTIES=-Djps.app.credential.overwrite.allowed=true %EXTRA_JAVA_PROPERTIES%
    to setDomainEnv.sh and restart the server as well as redeploy the application. However, after login, the page is still blank and it is very slow.

    oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection
    The JDBC conneciton configured in JDeveloper is not available in WebLogic server. Configure a JDBC connection in WebLogic server.

  • Adding image BUT not overwriting field info? Or Not saving name to DB?

    I've got a database that calls the image by a link using an image path:
    /images/jewelry1.jpg
    The image field contains the full path in its thumbnail field or its full
    size directory.
    I've created an insert record behavior which allows the client to create the
    path, but I want her to be able to upload the images.
    Right now, the image upload and resize behavior demands a table field, but I
    can't use the thumbnail field or it will overwrite the
    /thumbnail/jewelry1.jpg with the image name jewelry1.jpg and I'll lose the
    path.
    How can I add images to the directories without updating the the wrong
    fields? The same problem exists for the multiple file/image uploads. It not
    only asks for the images, but then wants to save the names to a database.
    Thanks

    Sorry. I'll take care that this wont happen again.
    I've two more queries. How do I store this image in a database. I'm using Access database and defined a field as OLE Object which allows me to store as either Linked or embedded object. Should I store the captured image directly or the buffered Image.
    1) Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection db=DriverManager.getConnection("jdbc:odbc:ds1","","");
    Statement st=db.createStatement();
    String str="insert into visitor (name,photo) values('"+t1.getText()+"','"+img+"')";
    int rs=st.executeUpdate(str);
    if (rs==1)
    System.out.println(t1.getText());
    2) The JFields whatever I've defined allowing me to enter more than what I've defined. How do I restrict those fields to the no of characters I wanted.

  • JDBC adapter table update Behaviour in PI

    Hello Experts ,
    I have Proxy to JDBC scenario ,please let know is there possible way to insert more than one line diff item for the same record ??
    Could you please explain the behavior of JDBC adapter.
    For Instance :
    Expected Behavior:
    Po number1 , item1 . ( first level of execution )
    Po number1 ,  item2. (second level of execution )
    Actual Behavior :
    Po number1 ,  item2. (second level of execution )
    In my scenario it is updating only the recent value , could you please suggest me .
    Regards
    Raja

    Hi ,
    Hope you are doing as below in mapping.
    Open insert statement twice and don't use PO Number as key field value .
    Ex:
    case1:
    Insert into tablename(ponumber,item)  values(123,'xyz') ;
    Insert into tablename(ponumber,item)  values(123,'rtz') ;
    O/P:two records gets inserted
    123  xyz
    123 rtz
    case2:
    Insert into tablename(ponumber,item)  values(123,'xyz') where ponumber =123 ;
    Insert into tablename(ponumber,item)  values(123,'rtz') where ponumber =123 ;
    O/P:2nd record overwrites the 1st record
    123 rtz
    Regards
    Venkat

  • Oracle/JDBC servlet problem

    My code and error message are found below:
    Why can't I resolve the variable "val"?
    Thanks
    package moreservlets;
    import java.sql.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    /** Simple servlet used to test the use of packages. */
    public class TitleQueries extends HttpServlet {
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    String title = "Connecting to Database";
    try {
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@pc840:1521:orcl", "scott", "tiger");
    Statement stmt = conn.createStatement();
    ResultSet rset = stmt.executeQuery
    ("select * from emp");
    while (rset.next()) {
    String val = rset.getString(1);
    catch(ClassNotFoundException cnfe) {
    System.err.println("Error loading driver: " + cnfe);
    catch(SQLException sqle) {
    System.err.println("Error connecting: " + sqle);
    out.println(ServletUtilities.headWithTitle(title) +
    "<body bgcolor=\"#FDF5E6\">\n" +
    "<h1 align=\"center\">" + title + "</h1>\n" +
    "<h1 align=\"center\">" + val + "</h1>\n" +
    "</body></html>");
    C:\J2ee\moreservlets>javac -d "C:\Program Files\Apache Tomcat 4.0\webapps\ROOT\W
    EB-INF\classes" TitleQueries.java
    TitleQueries.java:46: cannot resolve symbol
    symbol : variable val
    location: class moreservlets.TitleQueries
    "<h1 align=\"center\">" + val + "</h1>\n" +
    ^
    1 error

    You're declaring the variable "val" inside your while loop, which gives the variable scope inside that loop. As soon as the loop finishes executing, that variable will cease to be.
    Instead, declare the variable outside the while loop, and you can access it later on without any problems...
    String val = null;
    while (rset.next()) {
    val = rset.getString(1);
    }Just fyi though, in the current setup, you're only going to end up with the very last value retrieved from teh database, since you're overwriting val each time you loop through the resultset. If you want to keep all the variables, maybe use an ArrayList?

  • Jdbc log file

    Hi all,
    Do you know how it is possible to reduce the degree of what is logged in
    jdbc.log.
    Thanks

    Hi Jen!
    This is bug in 8.1ga and sp1 and it is fixed ib 81sp2.
    When you specify jdbc log name with ".log" suffix, jdbc logging doesn't
    rotate as expected. So, the prior log file would be overwrited by new jdbc
    log when you restart WLS.
    Workaround
    Remove ".log" from the file name. It would be added by WLS automatically.
    Thanks,
    Mitesh
    Jen wrote:
    Hi,
    whenever I restart the wls8.1, the jdbc logs are rewritten. I could not find my
    previous log to debug anymore, how can i config to make write to a new file like
    wls log. Thanks

  • Change JDBC driver used by OC4J

    Hi all,
    I did some testing of the different Oracle JDBC driver classes -- including "classes12.zip", "ojdbc14.jar" and "classes12dms.jar" -- in a plain old java class (nothing to do with OC4J). It seems to me that the "classes12.zip" file gives the best performance, so I was wondering if it is a good idea to make OC4J use this driver (instead of the "classes12dms.jar" file). If this is a good idea, then how can I make OC4J use the "classes12.zip" file (instead of the "classes12dms.jar" file) ?
    For your information, I am using OC4J stand-alone 10.0.3 on SUN [sparc] solaris 9 with Oracle 9i (9.2.0.4) database and java version 1.4.2_02.
    Thanks (in advance),
    Avi.

    Hi all,
    I did some testing of the different Oracle JDBC
    driver classes -- including "classes12.zip",
    "ojdbc14.jar" and "classes12dms.jar" -- in a plain
    old java class (nothing to do with OC4J). It seems to
    me that the "classes12.zip" file gives the best
    performance, so I was wondering if it is a good idea
    to make OC4J use this driver (instead of the
    "classes12dms.jar" file). If this is a good idea,
    then how can I make OC4J use the "classes12.zip" file
    (instead of the "classes12dms.jar" file) ?
    For your information, I am using OC4J stand-alone
    10.0.3 on SUN [sparc] solaris 9 with Oracle 9i
    (9.2.0.4) database and java version 1.4.2_02.
    Thanks (in advance),
    Avi.gday again Avi -- funny to see you posting questions instead of answering them!
    OK, here's the scoop.
    In the releases of the product to date (including the current developer preview) we've hardcode the JDBC class library (classes12dms.jar) into the Class-Path setting in the Manifest.mf file of the oc4j.jar file. This basically makes the one JDBC library load at the container level and is therefore used by all applications running on the product. This is done since some of the classes which are loaded by OC4j at the container level have a dependency on classes in the JDBC library, so they need to be available.
    The only way to change this is to :
    a) overwrite the classes12dms.jar with the the JDBC library you want to use -- ie rename the one you want to classes12dms.jar and put it in the directory where classes12dms.jar currently resides.
    b) open up the Manifest.mf in the oc4j.jar file and alter the Class-Path so it points to JDBC lib you want to use.
    I can't comment authoritavely on the supportability of either of these two tasks, but I suspsect that doing either of these would put you into an unsupported mode.
    But that doesn't concern you since you're running with a developer preview anyway ;-).
    The good news is that with the production release (or even another developer preview update) we'll have in place our new shared libary model. This will enable us to separate in a very clean way what is a system library and what are application libraries. We'll be able to setup and configure libraries that are available to applications which will not conflict with any libraries that are loaded at the container level. The new libs will be able to be shared by all or any subset of deployed applications if needed. It's quite an elegant and very powerful feature.
    So hack around today, but look forward to our next update of the 10.0.3 (which has recently be re-versioned to 10.1.3 for consistency across Oracle) release.
    cheers
    -steve-

  • Database DAO - JDBC Query Class - Code review please

    I use the following class (Database.java) as a DAO for handling all database calls. The class works. You can use this if you're looking for a DAO solution (i.e. a way to query databases using connection pools / JNDI). I am looking for some suggestions on improving this class. Can you help? I.e. suggestions for improving SELECT speed, logic? The class is used by a moderately heavily used Web application (ca. 2000 - 3000 queries a day - so not too much) on a Sun Web Server system.
    This class had the following interfaces:
    getErrors() // for retrieving any errors that occurred during an query
    setSql() // one way to set the SQL that must be run
    setDbName() // one way to set the JNDI name of the database resource
    getInsertDelete() // run the INSERT/DELETE statement that was provided with setSql
    getInsertDelete(String givenSql, String givenDb) // run with provided sql and db
    getClobInsert(String givenSql, String givenDb, Hashtable clobHash, String identifierSql) // clobHash contains the column name and the value (which is a string over 4000 chars). Identifier SQL is the SQL for identifying the row, into which the Clob must be inserted. This interface is specific to Oracle.
    getSelect() // Query database with set SQL. Return as a vector of hashes so I can close connection.
    getSelect(String givenSql, String givenDb) // select with given sqlAnd here is the full class. I know, this is a weird post, but we don't really have a code review process here at work, and I don't have a specific problem. Just want some feedback concerning the way I query our databases. So, any tips or comments are welcome.
    package melib.network;
    import java.io.Writer;
    import java.io.StringReader;
    import java.io.IOException;
    import java.util.Vector;
    import java.util.Hashtable;
    import java.sql.Connection;
    import java.sql.Statement;
    import java.sql.ResultSet;
    import java.sql.ResultSetMetaData;
    import java.sql.Clob;
    import javax.sql.DataSource;
    import javax.naming.InitialContext;
    import melib.system.PropertiesReader; // This is just a simple class for pulling values from a .properties file
    * Manages database connections.
    * @author jetcat33
    * @version 2.0, 2006-07-09
    public class Database {
        protected String sql = "";
        protected String dbName = "";
        private StringBuffer errors = new StringBuffer();
        /** Creates a new instance of Database */
        public Database() {
         * Check completeness of data
         * for example to check if dbname given or
         * sql given or to make sure that yikes
         * used instead of sccweb in test conditions
        protected boolean checkData(){
            if(dbName.equals("") || sql.equals("")){
                Email.sendMail(PropertiesReader.getValue("statusEmail"),null,"MelibLibraryError","melib error: [Database]","No database selected for query (db: "+dbName+" or sql not included (sql: "+sql+")");
                setErrors("No database selected for query (db: "+dbName+" or sql not included (sql: "+sql+")");
                return false;
            }else{
                return true;
         * Sets and gets errors resulting from
         * exceptions - otherwise would have to
         * somehow include errors in the results
         * that are returned but that would include
         * other more complicated stuff.
        private void setErrors(String e){
            errors.append("\n"+e);
        public StringBuffer getErrors(){
           return errors;
         * Setter for the sql variable.
         * @param givenSql The sql required to process
        public void setSql(java.lang.String givenSql) {
            sql = givenSql;
         * Sets the dbName needed to commect
         * to the correct database.
         * @param givenDbName Name of the database - name and connections specified within this class
        public void setDbName(java.lang.String givenDbName) {
            dbName = givenDbName;
         * Processes Insert and Delete requests with given SQL and DB Name.
         * @param givenSql
         * @param givenDbName
         * @return String Number of rows affected
        public String getInsertDelete(String givenSql, String givenDbName){
            sql = givenSql;
            dbName = givenDbName;
            return getInsertDelete();
         * Takes care of insert, update and delete requests.
         * Must have set both dbName as well as the sql String.
         * Will return number of rows affected as String.
         * @return String Number of rows affected
         * @exception Exception
        public String getInsertDelete() {
            int returnValue = 0;
            if(checkData()){
                Connection conn = null;
                InitialContext initContext = null;
                DataSource source = null;
                Statement stmt = null;
                try{
                    // Get connection from configured pool
                    initContext = new InitialContext();
                    source = (DataSource) initContext.lookup("java:comp/env/jdbc/" + dbName);
                    conn = source.getConnection();
                    if(conn != null){
                        stmt = conn.createStatement();
                        returnValue = stmt.executeUpdate(sql);
                }catch (Exception e){
                    Email.sendMail(PropertiesReader.getValue("statusEmail"),null,"MelibLibraryError","melib error: [Database.getInsertDelete]","getInsertDelete Exception: "+e.toString()+"\nWith: "+sql);
                    setErrors(e.toString());
                }finally{
                    try{
                        stmt.close();
                    }catch(Exception e){
                        e.printStackTrace();
                    try{
                        conn.close();
                    }catch(Exception e){
                       e.printStackTrace();
                    try{
                        initContext.close();
                    }catch(Exception e){
                        e.printStackTrace();
            return returnValue+"";
         * Processes Insert requests for SQL containing CLOBS
         * @param givenSql
         * @param givenDbName
         * @param clobHash Contains column name of clob and clob text
         * @param identifierSql Contains SQL to identify the just entered SQL so the clobs can be filled in.
         * @return String Number of rows affected
        public String getClobInsert(String givenSql, String givenDbName, Hashtable clobHash, String identifierSql){
            sql = givenSql;
            dbName = givenDbName;
            String returnValue="";
            int rv = 0;
            if(checkData()){
                Connection conn = null;
                InitialContext initContext = null;
                DataSource source = null;
                Statement stmt = null;
                try{
                    // Get connection from configured pool
                    initContext = new InitialContext();
                    source = (DataSource) initContext.lookup("java:comp/env/jdbc/" + dbName);
                    conn = source.getConnection();
                    if(conn != null){
                        conn.setAutoCommit(false);
                        stmt = conn.createStatement();
                        rv = stmt.executeUpdate(sql); // write first time
                        // Now get and overwrite "EMPTY_CLOB()"
                        ResultSet lobDetails = stmt.executeQuery(identifierSql);
                        ResultSetMetaData rsmd = lobDetails.getMetaData();
                        if(lobDetails.next()){
                            for(int i = 1; i <= rsmd.getColumnCount(); i++){
                                if(clobHash.get(rsmd.getColumnName(i))!=null && !clobHash.get(rsmd.getColumnName(i)).equals("")){
                                    Clob theClob = lobDetails.getClob(i);
                                    Writer clobWriter = ((oracle.sql.CLOB)theClob).getCharacterOutputStream();
                                    StringReader clobReader = new StringReader((String) clobHash.get(rsmd.getColumnName(i)));
                                    char[] cbuffer = new char[30* 1024]; // Buffer to hold chunks of data to be written to Clob, the slob
                                    int nread = 0;
                                    try{
                                        while((nread=clobReader.read(cbuffer)) != -1){
                                            clobWriter.write(cbuffer,0,nread);
                                    }catch(IOException ioe){
                                       //System.out.println("E: clobWriter exception - " + ioe.toString());
                                    }finally{
                                        try{
                                            returnValue+=" Writing: "+rsmd.getColumnName(i);
                                            clobReader.close();
                                            clobWriter.close();
                                        }catch(IOException ioe2){
                                            //System.out.println("E: clobWriter close exception - " + ioe2.toString());
                        conn.commit();
                }catch (Exception e){
                    Email.sendMail(PropertiesReader.getValue("statusEmail"),null,"MelibLibraryError","melib error: [Database.getClobInsert]","getClobInsert Exception: "+e.toString()+"\nWith: "+sql+"\nAND\n"+identifierSql);
                    setErrors(e.toString());
                }finally{
                    try{
                        stmt.close();
                    }catch(Exception e){
                        e.printStackTrace();
                    try{
                        conn.close();
                    }catch(Exception e){
                       e.printStackTrace();
                    try{
                        initContext.close();
                    }catch(Exception e){
                        e.printStackTrace();
                returnValue=rv+" "+returnValue;
            return returnValue;
         * Takes care of Select statements.
         * Must have set both dbName as well as the sql String.
         * Will return a vector.
         * @return Vector of Hashes containing the Results of the query
         * @exception SQLException
         * @exception Exception
        public Vector getSelect(){
            Vector returnValue = new Vector();
            if(checkData()){
                Connection conn = null;
                InitialContext initContext = null;
                DataSource source = null;
                ResultSet result = null;
                ResultSetMetaData rsmd = null;
                Statement stmt = null;
                try{
                    // Get connection from configured pool
                    initContext = new InitialContext();
                    source = (DataSource) initContext.lookup("java:comp/env/jdbc/" + dbName);
                    conn = source.getConnection();
                    if(conn != null){
                        stmt = conn.createStatement();
                        result = stmt.executeQuery(sql);
                        rsmd = result.getMetaData();
                        while(result.next()){
                            Hashtable hash = new Hashtable();
                            for(int i = 1; i <= rsmd.getColumnCount(); i++){
                                if(result.getString(i) != null){
                                    hash.put(rsmd.getColumnName(i),result.getString(i));
                                }else{
                                    hash.put(rsmd.getColumnName(i),"");
                            returnValue.addElement(hash);
                }catch (Exception e){
                    Email.sendMail(PropertiesReader.getValue("statusEmail"),null,"MelibLibraryError","melib error: [Database.getSelect]","getSelect Exception: "+e.toString()+"\nWith: "+sql);
                    setErrors(e.toString());
                }finally{
                    try{
                        result.close();
                    }catch(Exception e){
                        e.printStackTrace();
                        setErrors(e.toString());
                    try{
                        stmt.close();
                    }catch(Exception e){
                        e.printStackTrace();
                        setErrors(e.toString());
                    try{
                        conn.close();
                    }catch(Exception e){
                       e.printStackTrace();
                       setErrors(e.toString());
                    try{
                        initContext.close();
                    }catch(Exception e){
                        e.printStackTrace();
                        setErrors(e.toString());
            return returnValue;
         * Takes care of Select statements with given SQL.
         * Must have set both dbName as well as the sql String.
         * Will return a vector.
         * @return Vector with Results of the query
         * @exception SQLException
         * @exception Exception
        public Vector getSelect(String givenSql, String givenDbName){
            sql = givenSql;
            dbName = givenDbName;
            return getSelect();
    }Thank you,
    dailysun

    too much code that's repeated. refactor all the code you have for closing resources into a utility class and simply call its methods.
    your dao creates the connection, so it can't participate in a transaction. if there are several daos that should be one unit of work, you can't manage it with this framework.
    transactions are under the control of a service layer. I think it's better to have the service object get the connection, pass it to all the DAOs needed for that unit of work, and then have the service close it.
    e-mailing errors? I don't like it. if you have 2-3K queries a day failing because the database you'll have 2-3K e-mails to delete. better to log messages. if you really want e-mail, you can have Log4J add an e-mail appender. at least that way it's configurable outside the code.
    CRUD operations without an UPDATE? You're missing something important.
    What if I don't want to get the database from a JNDI datasource? Now you can't use this DAO without an app server.
    Your error messages are less informative than a stack trace. Why not throw an exception with detailed info?
    have a look at Spring and how it handles persistence. if you insist on writing your own, might want to look at Spring. Rod Johnson has developed a much better, more general way to handle persistence.
    http://www.springframework.org
    You return a Vector of Hashtables for queries? Two old-school data structures. You understand the implication of choosing those, right? I'd recommend that you change that to a List of Maps. Let the concrete types be ArrayList and HashMap. Interfaces are preferred, because they let you change the implementation without affecting clients. Vector and Hashtable are synchronized by default; ArrayList and HashMap are not. Synchronization is thread safe but slower.
    I understand why you chose to return Vector, because you wanted something general that wouldn't force you to deal with object-relational mapping. This way you can just worry about ResultSetMetaData.
    A Vector of Hashtables is a row-based view of the ResultSet (one Hashtable per row). Sometimes a column based view can be more convenient. Then it's a Map of Lists.
    You gave it a good try, but I think there's a lot of room for improvement.
    %

  • How to keep the old jdbc log file

    Hi,
    whenever I restart the wls8.1, the jdbc logs are rewritten. I could not find my
    previous log to debug anymore, how can i config to make write to a new file like
    wls log. Thanks

    Hi Jen!
    This is bug in 8.1ga and sp1 and it is fixed ib 81sp2.
    When you specify jdbc log name with ".log" suffix, jdbc logging doesn't
    rotate as expected. So, the prior log file would be overwrited by new jdbc
    log when you restart WLS.
    Workaround
    Remove ".log" from the file name. It would be added by WLS automatically.
    Thanks,
    Mitesh
    Jen wrote:
    Hi,
    whenever I restart the wls8.1, the jdbc logs are rewritten. I could not find my
    previous log to debug anymore, how can i config to make write to a new file like
    wls log. Thanks

  • Cannot attach data store shared-memory segment using JDBC (TT0837)

    I'm currently evaluating TimesTen during which I've encountered some problems.
    All of the sudden my small Java app fails to connect to the TT data source.
    Though I can still connect to the data source using ttisql.
    Everything worked without problems until I started poking around in the ODBC administrator (Windows 2K).
    I wanted to increase permanent data size so I changed some of the parameters.
    After that my Java app fails to connect with the following message:
    DriverManager.getConnection("jdbc:timesten:direct:dsn=rundata_tt60;OverWrite=0;threadsafe=1;durablecommits=0")
    trying driver[className=com.timesten.jdbc.TimesTenDriver,com.timesten.jdbc.TimesTenDriver@addbf1]
    SQLException: SQLState(08001) vendor code(837)
    java.sql.SQLException: [TimesTen][TimesTen 6.0.4 ODBC Driver][TimesTen]TT0837: Cannot attach data store shared-memory segment, error 8 -- file "db.c", lineno 8846, procedure "sbDbConnect()"
    The TT manual hasn't really provided any good explanation what the error code means.
    Obviusly I'v already tried restoring the original ODBC parameters without any luck.
    Ideas..anyone?
    /Peter

    Peter,
    Not sure if you have resolved this issue or not. In any case, here are some information to look into.
    - On Windows 32-bit, the allocation of shared data segment doesn't work the same way like on Unix and Linux. As a result, the maximum TimesTen database size one can allocate is much smaller on the Windows platform than on other platforms.
    - Windows error 8 means ERROR_NOT_ENOUGH_MEMORY: not enough storage is available to process this command.
    - TimesTen TT0837 says the system was unable to attach a shared memory segment during a data store creation or data store connection operation.
    - What was the largest successful perm-size and temp-size you used when allocating the TimesTen database?
    * One explanation for why you were able to connect using ttIsql is that it doesn't use much of the DLLs, whereas your Java application typically has a lot more DLLs.
    * As a troubleshooting step, you can try reduce your Temp-size to a very small size and just see if you can connect to the data store. Eventually, you may need to reduce your perm-size to get Windows to fit the shared data segment in the process space.
    By the way the TimesTen documentation has been modified to document this error as follows:
    Unable to attach to a shared memory segment during a data store creation or data store connection operation.
    You will receive this error if a process cannot attach to the shared memory segment for the data store.
    On UNIX or Linux systems, the shmat call can fail due to one of:
    - The application does not have access to the shared memory segment. In this case the system error code is EACCESS.
    - The system cannot allocate memory to keep track of the allocation, or there is not enough data space to fit the segment. In this case the system error code is ENOMEM.
    - The attach exceeds the system limit on the number of shared memory segments for the process. In this case the system error code is EMFILE.
    It is possible that some UNIX or Linux systems will have additional possible causes for the error. The shmat man page lists the possibilities.
    On Windows systems, the error could occur because of one of these reasons:
    - Access denied
    - The system has no handles available.
    - The segment cannot be fit into the data section
    Hope this helps.
    -scheung

  • JExcel with JDBC

    Hello,
    I've just started working with the JExcel API, which I am using to automate the process of data being queried from a database and placed into an excel spreadsheet. The problem I'm having is that I also want to automate the creation of a pivot table based on that data. I gather from the jexcel documentation that it can't actually be used to create a pivot table, but that if one already exists based on the data and only the data changes, that should be enough to do what I want. I've tried creating a workbook with the data in it and the pivot table based on that data in a second sheet, but then the data is altered an entirely new workbook is created in which the pivot table does not exist, and I am unsure how to simply alter the data in the existing table rather than overwriting it. I also tried a seperate workbook file containing the pivot table, on the assumption that as the data changed it would simply be able to update itself. Unfortunately as the file is overwritten the link to is as a data reference is lost, and so this too causes problems.
    Any help would be much appreciated,
    Many thanks in advance.

    This question is entirely about JExcel and has nothing to do with JDBC (which is the purpose of this forum.)
    That said there is nothing wrong, conceptually, with your approach.
    Ther are two possibilities.
    The documentation is wrong.
    You are doing something wrong in your code.
    If the latter then it might be how you are altering the data - find a different way and it might work.

  • Problems with Oracle jdbc Driver

    Hi... I'm trying to connect to my Oracle Database and I get the folowing error:
    "package oracle.jdbc.driver does not exist"
    I have installed Oracle 9.1.0.2 Database...
    The value of the Classpath variable is:
    ".;c:\oracle\ora92\jdbc\lib"
    What could be the problem???...
    Thanks in advance.-
    Alberto.-

    Are you building your application from the command line? Or using a GUI? GUI's will frequently overwrite your CLASSPATH environment variable...
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Overwrite init() method???

    Hi,
    How to overwrite init() method.?? is this possible ????
    write code how to do

    jsf_VWP5.5.1 wrote:
    Hi,
    How to overwrite init() method.?? is this possible ????
    write code how to dothe init method is called only once. In the init method we usually mention the database driver...like say for example--->
    public void init(ServletConfig servletconfig)
            throws ServletException
            super.init(servletconfig);
            try
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                return;
            catch(ClassNotFoundException classnotfoundexception)
                log("Couldn't load class sun.jdbc.odbc.JdbcOdbcDriver");
                throw new ServletException(classnotfoundexception.getMessage());
        }here the necessary drivers get loaded.
    hope you get the point:)
    regards,
    a_joseph

  • Cannot assign an empty string to a parameter with JDBC type VARCHAR

    Hi,
    I am seeing the aforementioned error in the logs. I am guessing its happening whenever I am starting an agent instance in PCo. Can somebody explain whats going on?
    Regards,
    Chanti.
    Heres the complete detail from logs -
    Log Record Details   
    Message: Unable to retreive path for , com.sap.sql.log.OpenSQLException: Failed to set the parameter 1 of the statement >>SELECT ID, PARENTID, FULLPATH, CREATED, CREATEDBY, MODIFIED, MODIFIEDBY, REMOTEPATH, CHECKEDOUTBY FROM XMII_PATHS WHERE FULLPATH =  ?  <<: Cannot assign an empty string to a parameter with JDBC type >>VARCHAR<<.
    Date: 2010-03-12
    Time: 11:32:37:435
    Category: com.sap.xmii.system.FileManager
    Location: com.sap.xmii.system.FileManager
    Application: sap.com/xappsxmiiear

    Sounds like a UI browsing bug (when no path is selected from a catalog tree folder browser) - I would suggest logging a support ticket so that it can be addressed.

  • How to make mac address gmail contacts overwrite the ones on my HTC Android phone - I don't want to sync - that makes the phone scramble and overwrite my computer.  I want to remove or correctly overwrite the phone information as I have done with iPad.

    Please help - I am beginning to hate google, my android and gmail.  I have just wasted about 5 hours in a futile attempt to try and get my current Mac contacts list on my computer updated to my phone. I'm not that computer literate but I have looked up about google phone accounts, vCards, backing up contact lists, what SD on phones are, and God know what else.  I have searched the internet and tried all sorts of things and I still have a mac with a now correct contact list (after the iPad contacts scrambled it and I spent ages manually correcting them all) and a phone with an outdated contact list.  If you try and sync them the phone wants to overwrite the computer one just like the iPad did (would it be so **** hard to give you a choice on the phone as to which overwrites which!).  After all the  advice on the internet failed, I got the bright idea to completely delete all the ones on the phone and if it was empty of contacts the computer one could be exported to it.  Not as simple as it sounds.  First I backed up (I think) my computer contacts list. Numerous futile attempts to go through the phone options to globally delete all contacts did not work - they gave a warning message and you got to choose whether to continue or not, I did, and it looked like it might be working as it changed to zero data on the phone, but then they all popped back up again from God knows where from, but without their little added bits like pictures of the people.  So, I tried un- syncing the darn phone from  google and then deleting them globally.  That didn't work either.  I tried deleting them  all again and again and google would crash and not let me do it. It is absolutely ridiculous that this is so damned difficult to do (especially if you are not computer savvy) and that you cannot choose which device overwrites which when syncing. I gave up and ticked sync with Google again (not that it appears to do anything to the phone contact list at all).  So after 5 hours I am back to where I started from, with a phone showing all the same  incorrect contacts (but the pictures are back), which wants to overwrite the computer if I try any sort of sync, and no way to fix them except go into each one manually and try and do it - and how long would that take (and I've already wasted hours and hours fixing scrambled contact lists!).  I think I will do a print out of the computer contact list and just carry it around with me like an address book - so much bloody simpler.  So now I have a headache, am fighting an overwhelming urge to hurl the phone at the wall,  hoping for a heat wave to evaporate icloud things and am wishing I had bought an iPhone instead of the stupid HTC Android.  Can any one offer me any suggestions on how to get rid of the contacts on my phone and replace them with the ones in my mac address list - hopefully after that  they can sync to their hearts content and not stuff everything up again (which was why I unsynced google a while back - because the phone's list kept making stuff ups and scrambling and duplicating my computer contacts list).  Am I the only one on the planet having this problem or is there someone else out there who has had it and solved it.

    Without "pretending" to be yourself on the other phone (change settings) there's nothing else you can do.
    iOS devices are meant to be single user and can't view iCloud.com the same way a Mac or PC can do.
    You need to find a desktop or laptop machine (Mac or PC) to log in at iCloud.

Maybe you are looking for

  • WHY DOESN'T SMTP PROPERLY WORK IN LEOPARD?

    This is unacceptable Apple. The most basic of programs, Mail, does not work properly. I can't send Email from Mail. No problems with 10.4.x. I "upgrade" to this. Judging by the forums this is a HUGE bug and needs to be fixed ASAP. Thanks Apple for ma

  • Transfering FCP Document files to a windows comp..I can't get it. Help!!!!!

    I transfered all the fcp document files to my windows desktop computer over the network to free up some space on my mac, thinking I would be able to use the files later on on my mac thru the network. The files aren't shown in fcp file types but in ex

  • How do you edit sound in multicam (cs5)

    Hi all, I always see people raving about multi cam editing for wedding speeches but on the 10 or so occasions Ive given it a try I just give up instantly due to the fact that I feel so limited in what I can do with the audio. I would use it for weddi

  • I updated my ipod 2 1.2 and now i cant c ma songs list just my ipod pic

    this is really ******* me off iv been tryna do this 4 a week and still nuthing i updated my itunes and my ipod 2 1.2software and now when i connect my ipod to itunes all that comes up is a pic of my ipod video and thats it i cant play my songs and i

  • HT5509 Remove dark area in Guided access.

    Is it possible to switch off the darker area that emerges in Guided access?That is, the screen looks normal but still has the touch limitations.