Jdbc & linux & backward scrolling(urgent)

hello
I'm using jdbc in linux.The database is postgresql.
Is backward scrolling possible using jdbc:postgresql driver?
I'm not able to use functions.....
ResultSet.first() & ResultSet.previous() & ResultSet.beforeFirst()
How can this be made possible using this driver?
Please reply soon...
raisha

Raisha, I had the same question a while ago. I believe it has to do with JDBC version vs. JDBC version 2. I would investigate that avenue. You would probably need a driver that supports JDBC version 2. Check Postgres resources to see if such a driver is available.
Patrick

Similar Messages

  • b font color ='red' Java JDBC and Oracle DB URGENT HELP PLEASE /font /b

    Hello, I am a newbie. I'm very interested in Java in relation to JDBC, Oracle and SAP.I am trying to connect to an Oracle DB and I have problems to display the output on the consule in my application. What am I doing wrong here . Please help me. This is my code: Please Explain
    import java.sql.*;
    import java.sql.DriverManager;
    import java.sql.Connection;
    public class SqlConnection {
         public static void main(String[] args) {
              Class.forName("oracle.jdbc.driver.OracleDriver"); //Loading the Oracle Driver.
              Connection con = DriverManager.getConnection
              ("jdbc:orcle:thin:@34.218.5.3:1521:ruka","data","data"); //making the connection.
              Statement stmt = con.createStatement ();// Sending a query to the database
              ResultSet rs = stmt.executeQuery("SELECT man,jean,test,kok FROM sa_kostl");
              while (rs.next()) {
                   String man = rs.getString("1");
                   String jean = rs.getString("2");
                   String test = rs.getString("3");
                   String kok = rs.getString("4");
                   System.out.println( man, jean, test,kok );//here where my the
                                                 //compiler gives me errors
              stmt.close();
              con.close();
    }

    <b><font color ='red'>Java JDBC and Oracle DB URGENT HELP PLEASE</font></b>Too bad your attempt at getting your subject to have greater attention failed :p

  • JDBC 2.0 Scroll-ResultSet is not working

    MY Environment is
    OS = W/NT
    Servlet Engine = JRUN 1.8
    JDK = JDK1.2.2
    Language = JSP (Jsdk2.0)
    JDBC Driver = Oracle JDBC THIN Drivers
    release 8.1.6 for JDK 1.2.x (classes12.zip)
    DBMS = Oracle 8.1.5
    A statement using a constructor like below produces no result, the HTML-output stops at the point where the statement is created, but there is no error or exception message.
    Statement stmt = conn.createStatement (ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
    Using the "createStatement()"-constructor is working all right, but specifiying resultset and concurrency type (even if TYPE_FORWARD_ONLY and CONCUR_READ) produces the reaction described above.
    Any suggestions welcome, please send mail to:
    [email protected]
    null

    Meanwhile I have succeeded in running a scrollable result set with Oracle's driver by simply changing the jsp-environment and using Tomcat (http://jakarta.apache.org/). Everything seems to be working all right now. So after all, JDBC 2.0 Scroll-ResultsSet is working.
    null

  • JDBC-XI-IDoc scenario -- Urgent

    Hi All,
    I am doing a scenario JDBC-XI-IDoc.
    Now the Oracle table in the source system, has a control table as well.
    This control table has 2 fields MSGID and MSGTSTAMP. These 2 fields has to be updated for each record.
    Now please tell me, how this can be handled?
    The MSGID and MSGTSTAMP r created in XI, so we need to send it back to source system, but how?
    Its urgent, early reply will b appreciated.
    Thanks in advance.
    Neetesh

    Hi Neetesh,
    Yes , you can do it using BPM.
    <i>So, it should be something like- XI triggers IDoc to R/3 and almost at the same time, sends back the MSGID and MSGTSTAMP to JDBC.</i>
    >>> Then I think you can do without Synch communication.
    -Receive the Message in BPM(after mapping)
    -Fork step to send both messages at same time
    -Send to Idoc 
    -Send to JDBC
    But you need to have 2 receivers.
    1) BPM->Idoc
    2) BPM->JDBC
    It will do.
    SO u can do without Synch communication also.
    Pls acknowledge
    Regards,
    Moorthy

  • Mysql, JDBC, Linux and Access Denied

    I have just installed a MySQL Connctor/J 2.0.14 (JDBC) to be able to connect to a MYSQL-database on a Linux-server from a java-program on the same server. But I keep on getting an access-right-error. I would be very thankfull if someone could help me.
    From the linux-shell I can connect to the database with mysql:
    [root@dat test]# mysql -u speciale -p specialetestDB
    But when I try to connect from the Java-program I recieve the following error:
    [root@dat test]# java TestDB
    SQL-fejl: Invalid authorization specification: Access denied for user: 'speciale@dat' (Using password: YES)
    The program Is very simple:
    import java.sql.*;
    public class TestDB {
    public static void main(String[] args) {
    try {
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    Connection connection = DriverManager.getConnection(
    "jdbc:mysql://localhost/specialetestDB?user=speciale&password=x");
    Statement statement = connection.createStatement();
    ResultSet resultSet = statement.executeQuery(
    "Select Vnavn from VidensElement");
    while (resultSet.next())
    System.out.println(resultSet.getString("Vnavn"));
    statement.close();
    connection.close();
    catch (SQLException sqlException) {
    System.out.println("SQL-fejl: " + sqlException.getMessage());
    catch (ClassNotFoundException classNotFoundException) {
    System.out.println("Driver ikke fundet: " +
    classNotFoundException.getMessage());
    catch (Exception instantiationException) {
    System.out.println("Driver kan ikke instantieres: " +
    instantiationException.getMessage());
    Sanne

    the password you have listed as what you use fromthe
    shell vs. what you have in yoour code are not the
    same. they need to be the same.
    other than that make sure you user account in mysqlis
    set up to accept connections from wherever you needit
    to. Thanks,
    The passwords are the same - I just didn't show it in
    the copied text. Actually the shell-dialog is:
    From the linux-shell I can connect to the database
    with mysql:
    [root@dat test]# mysql -u speciale -p specialetestDB
    password: x
    sorry my fault, but it probably was worth checking
    But what you said about my user accounts might be the
    problem In the mysql.user tabel I have 3 instances of
    the "speciale" user, each with a different host: "%",
    "dat" and "localhost".
    Is that what you ment?
    yes. it is possible that the passwords are not the same. so the password for speciale from localhost is not the same as from % or dat. why don't you delete the dat and localhost ones and just leave the % one.

  • JDBC Linux

    Hi,
    I currently hava some codes that connects to and oracle database. On my pc (Windows) using this command:
    D:\rrkear\ONFiles\GAT_DataAccess\GatCodementation\DataAccessServer\dataaccess>ja
    va -classpath .;classes12.jar dataaccess.DataAccess
       I works fine, but when I run it on Linux, which can also connect to the database using sqlplus, it errors on the part
         Class.forName("oracle.jdbc.driver.OracleDriver");
       although I'm giving the path to the classes12.jar on my classpath. It reports a ClassNotFoundException Error. Please advise on what else do I need to check. Thanks.
    Regards,
    Rhani

    Hi,
    It's working now, I've noticed that on my CLASSPATH environment variable I already have the classes12.jar located in some other directory. So I tried removing the classes12.jar when I specify the -classpath option and it worked. Is having two the same jar files in the class path causes an error?
    Thanks.
    Regards,
    Rhani

  • Linux: mousewheel scrolling.

    I'm using Linux Mint 13 Maya, Firefox 21.0. Throughout the system mousewheel works fine. In Firefox I can close a tab by clicking mousewheel on it, as well as open a link in a new tab with mousewheel. However, I can't scroll the page by clicking on a page with mousewheel and then dragging the mouse up and down.
    Is this function implemented in 21.0? I really miss it for scrolling long pages. Is there anything I can do to enable it or do I have to submit a feature request?

    Note that you can also find this setting in the user interface.
    *Edit > Preferences > Advanced > General: Browsing: "Use autoscrolling"

  • XI JDBC J2EE Poor Performance Urgent

    Hi All,
    We are currently experiencing some major performance problems with one of our JDBC connections in production.
    Our scenario is this, we are using the J2EE engine of our XI box as a gateway for BI UD Connect.
    We are extracting from a simple Informix DB table some 600,000+ records which is a full extract, but this is taking like 2.5 hrs to do.  This is the worst table but there are others that are really slow also. 
    If we extract directly using the same JDBC drivers but outside of XI it takes 1.5minutes.
    Can anyone offer any assistance?
    Are there any parameters we could change that would affect the performance?
    Thanks in advance.
    Craig

    Christophe,
    We are merely using the J2EE stack connecting it to the BW ABAP stack via RFC.
    Here is an extract from the SAP document "How To - Using UDI to Connect to Non-SAP Database"
    UD Connect utilizes the J2EE engine of the SAP Web Application server to access external data. This Howto
    will deal with the set-up and configuration of the relational JDBC connector.
    This guide will detail the steps necessary to connect the SAP BW ABAP stack with the J2EE stack via RFC
    as well as configuring the JDBC connector to use the database vendor provided JDBC driver.
    Hope this helps.
    Basically XI's J2EE Engine is being used as a gateway to BW nothing more.
    Thanks
    Craig

  • Install Form 6i on Linux Mandrake 8, urgent !?

    Hi all,
    I am new in Linux and I have download Form 6i Release 2.
    Please tell me step by step how to install Form 6i R2 on Linux Mandrake 8 because
    I did not found any document about this in d2k6irelease2.tar and I very desperate.
    Any suggestion I will very appreciate.
    Thank you.
    Teguh
    null

    someone please help!
    Any suggestion I will very appreciate.

  • [b]Java JDBC and Oracle DB URGENT HELP PLEASE[/b]

    Hello, I am a newbie. I'm very interested in Java in relation to JDBC, Oracle and SAP.I am trying to connect to an Oracle DB and I have problems to display the output on the consule in my application. What am I doing wrong here . Please help me. This is my code: Please Explain
    import java.sql.*;
    import java.sql.DriverManager;
    import java.sql.Connection;
    public class SqlConnection {
    public static void main(String[] args) {
    Class.forName("oracle.jdbc.driver.OracleDriver"); //Loading the Oracle Driver.
    Connection con = DriverManager.getConnection
    ("jdbc:orcle:thin:@34.218.5.3:1521:ruka","data","data"); //making the connection.
    Statement stmt = con.createStatement ();// Sending a query to the database
    ResultSet rs = stmt.executeQuery("SELECT man,jean,test,kok FROM sa_kostl");
    while (rs.next()) {
    String man = rs.getString("1");
    String jean = rs.getString("2");
    String test = rs.getString("3");
    String kok = rs.getString("4");
    System.out.println( man, jean, test,kok );//here where my the
    //compiler gives me errors
    stmt.close();
    con.close();
    }

    Hello, I am a newbie. I'm very interested in Java in
    relation to JDBC, Oracle and SAP.I am trying to
    connect to an Oracle DB and I have problems to
    display the output on the consule in my application.
    What am I doing wrong here . Please help me. This is
    my code: Please Explain
    import java.sql.*;
    import java.sql.DriverManager; <--- Why do you have these (java.sql.* is enough)
    import java.sql.Connection;
    public class SqlConnection {
    public static void main(String[] args) {// Where's the try/catch block?
    >
    Class.forName("oracle.jdbc.driver.OracleDriver");
    //Loading the Oracle Driver.
    Connection con = DriverManager.getConnection
    ("jdbc:orcle:thin:@34.218.5.3:1521:ruka","data","data"
    ); //making the connection.
    Statement stmt = con.createStatement ();// Sending a
    query to the database
    ResultSet rs = stmt.executeQuery("SELECT
    man,jean,test,kok FROM sa_kostl");
    while (rs.next()) {
    String man = rs.getString("1");
    String jean = rs.getString("2");
    String test = rs.getString("3");
    String kok = rs.getString("4");
    System.out.println( man, jean, test,kok );//here
    where my the
    //compiler gives me errors
    stmt.close();
    con.close();
    }The compiler is probably complaining about the lack of a try/catch block.
    The fact that you can't understand the compiler messages, and didn't read the javadocs enough to know that you needed a try/catch block, suggest to me that you need to learn a lot more about Java. This is pretty fundamental stuff.
    When you have problems, it's best to include information about what the compiler or runtime is telling. Error messages and stack traces are helpful.
    In your case the error is so elementary that more information isn't necessary.
    %

  • JDBC Driver (HELP NEEDED URGENTLY)

    Hi, I'm a student who has a project to be done on java.
    I would like to use access or some other db tt is plafform independence.
    However, I do not know of such a dbms system. Can someone help me by telling me with access can be used on other plafform or there is a better dbms out there?
    Also , is there any way the client can just do installation without using jdbc to odbc bridge as the installion of the application should be easy and do not require the client to do install addition stuff or trouble themselve over the installtion of the software. Your help is greatly needed Thank you.

    I assume you meant "db that is platform independent."
    Try http://postgresql.org or http://mysql.org. Both
    are free, open source and well supported. And nearly
    anything is 'better' than Access. Not sure about the
    second part of your query.Message:
    Thanks for the tip man. The second problem i have is that i m trying to create a program that run on stand alone PC . It must be able to access a database. However, using the odbc bridge means that it is not plafform indepence while is one of the aim i have for the program. Is it possible to find a driver that dont need to the odbc and can run on standalone PC without a server between there?
    thanks you for all your help!!!

  • "com.mysql.jdbc.PacketTooBigException": Help needed urgently

    hi,
    I am using mm.mysql j/connector ver 3.0.6 and MYSQL server version 4.0.
    Max_allowed packet= 8MB at the server side
    I am getting PacketTooBigException when i am trying to update a particular column.
    What should i do.
    Any help will be greatly appreciated!!!

    the driver uses a 64 k max packet size by default. it is supposed to change this as neccessary upon connection but perhaps that is failing?
    below is the 3.0.7 connection code that i have slightly modified for you so that it prints out the connection properties after they have been initialized so that you can see what they are.
    try it out and i hope you find this helpful.
       Copyright (C) 2002 MySQL AB
          This program is free software; you can redistribute it and/or modify
          it under the terms of the GNU General Public License as published by
          the Free Software Foundation; either version 2 of the License, or
          (at your option) any later version.
          This program is distributed in the hope that it will be useful,
          but WITHOUT ANY WARRANTY; without even the implied warranty of
          MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
          GNU General Public License for more details.
          You should have received a copy of the GNU General Public License
          along with this program; if not, write to the Free Software
          Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    /*Slight Modification by Max Stocker April 29, 2003 to trace what the connection values get initialized to. */
    package com.mysql.jdbc;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.Reader;
    import java.io.UnsupportedEncodingException;
    import java.math.BigDecimal;
    import java.net.URL;
    import java.sql.Clob;
    import java.sql.Date;
    import java.sql.ParameterMetaData;
    import java.sql.Ref;
    import java.sql.SQLException;
    import java.sql.Savepoint;
    import java.sql.Time;
    import java.sql.Timestamp;
    import java.util.ArrayList;
    import java.util.Calendar;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.util.List;
    import java.util.Map;
    import java.util.Properties;
    import java.util.StringTokenizer;
    import java.util.TimeZone;
    * A Connection represents a session with a specific database.  Within the
    * context of a Connection, SQL statements are executed and results are
    * returned.
    * <P>A Connection's database is able to provide information describing
    * its tables, its supported SQL grammar, its stored procedures, the
    * capabilities of this connection, etc.  This information is obtained
    * with the getMetaData method.
    * @see java.sql.Connection
    * @author Mark Matthews
    * @version $Id: Connection.java,v 1.31.2.19 2003/03/28 22:42:24 mmatthew Exp $
    public class Connection implements java.sql.Connection {
        // The command used to "ping" the database.
        // Newer versions of MySQL server have a ping() command,
        // but this works for everything
        private static final String PING_COMMAND = "SELECT 1";
         * Map mysql transaction isolation level name to
         * java.sql.Connection.TRANSACTION_XXX
        private static Map mapTransIsolationName2Value = null;
         * The mapping between MySQL charset names
         * and Java charset names.
         * Initialized by loadCharacterSetMapping()
        private static Map charsetMap;
         * Table of multi-byte charsets.
         * Initialized by loadCharacterSetMapping()
        private static Map multibyteCharsetsMap;
         * Default socket factory classname
        private static final String DEFAULT_SOCKET_FACTORY = StandardSocketFactory.class
            .getName();
        static {
            loadCharacterSetMapping();
            mapTransIsolationName2Value = new HashMap(8);
            mapTransIsolationName2Value.put("READ-UNCOMMITED",
                new Integer(TRANSACTION_READ_UNCOMMITTED));
              mapTransIsolationName2Value.put("READ-UNCOMMITTED",
                   new Integer(TRANSACTION_READ_UNCOMMITTED));
            mapTransIsolationName2Value.put("READ-COMMITTED",
                new Integer(TRANSACTION_READ_COMMITTED));
            mapTransIsolationName2Value.put("REPEATABLE-READ",
                new Integer(TRANSACTION_REPEATABLE_READ));
            mapTransIsolationName2Value.put("SERIALIZABLE",
                new Integer(TRANSACTION_SERIALIZABLE));
         * Internal DBMD to use for various database-version
         * specific features
        private DatabaseMetaData dbmd = null;
         * The list of host(s) to try and connect to
        private List hostList = null;
          * A map of statements that have had setMaxRows() called on them
         private Map statementsUsingMaxRows;
         * The I/O abstraction interface (network conn to
         * MySQL server
        private MysqlIO io = null;
         * Mutex
        private final Object mutex = new Object();
         * The driver instance that created us
        private NonRegisteringDriver myDriver;
         * The map of server variables that we retrieve
         * at connection init.
        private Map serverVariables = null;
         * Properties for this connection specified by user
        private Properties props = null;
         * The database we're currently using
         * (called Catalog in JDBC terms).
        private String database = null;
         * If we're doing unicode character conversions,
         * what encoding do we use?
        private String encoding = null;
         * The hostname we're connected to
        private String host = null;
         * The JDBC URL we're using
        private String myURL = null;
         * The password we used
        private String password = null;
         * Classname for socket factory
        private String socketFactoryClassName = null;
         * The user we're connected as
        private String user = null;
         * The timezone of the server
        private TimeZone serverTimezone = null;
         * Allow LOAD LOCAL INFILE (defaults to true)
        private boolean allowLoadLocalInfile = true;
         * Are we in autoCommit mode?
        private boolean autoCommit = true;
         * Should we capitalize mysql types
        private boolean capitalizeDBMDTypes = false;
         * Should we continue processing batch commands if
         * one fails. The JDBC spec allows either way, so
         * we let the user choose
        private boolean continueBatchOnError = true;
         * Should we do unicode character conversions?
        private boolean doUnicode = false;
         * Are we failed-over to a non-master host
        private boolean failedOver = false;
        /** Does the server suuport isolation levels? */
        private boolean hasIsolationLevels = false;
         * Does this version of MySQL support quoted identifiers?
        private boolean hasQuotedIdentifiers = false;
        // This is for the high availability :) routines
        private boolean highAvailability = false;
         * Has this connection been closed?
        private boolean isClosed = true;
         * Should we tell MySQL that we're an interactive client?
        private boolean isInteractiveClient = false;
         * Is the server configured to use lower-case
         * table names only?
        private boolean lowerCaseTableNames = false;
         * Has the max-rows setting been changed from
         * the default?
        private boolean maxRowsChanged = false;
         * Do we expose sensitive information in exception
         * and error messages?
        private boolean paranoid = false;
         * Should we do 'extra' sanity checks?
        private boolean pedantic = false;
         * Are we in read-only mode?
        private boolean readOnly = false;
        /** Do we relax the autoCommit semantics? (For enhydra, for example) */
        private boolean relaxAutoCommit = false;
         * Do we need to correct endpoint rounding errors
        private boolean strictFloatingPoint = false;
         * Do we check all keys for updatable result sets?
        private boolean strictUpdates = true;
        /** Are transactions supported by the MySQL server we are connected to? */
        private boolean transactionsSupported = false;
         * Has ANSI_QUOTES been enabled on the server?
        private boolean useAnsiQuotes = false;
         * Should we use compression?
        private boolean useCompression = false;
         * Can we use the "ping" command rather than a
         * query?
        private boolean useFastPing = false;
         * Should we tack on @hostname in DBMD.getTable/ColumnPrivileges()?
        private boolean useHostsInPrivileges = true;
         * Should we use SSL?
        private boolean useSSL = false;
         * Should we use stream lengths in prepared statements?
         * (true by default == JDBC compliant)
        private boolean useStreamLengthsInPrepStmts = true;
         * Should we use timezone information?
        private boolean useTimezone = false;
        /** Should we return PreparedStatements for UltraDev's stupid bug? */
        private boolean useUltraDevWorkAround = false;
        private double initialTimeout = 2.0D;
         * How many hosts are in the host list?
        private int hostListSize = 0;
         * isolation level
        private int isolationLevel = java.sql.Connection.TRANSACTION_READ_COMMITTED;
         * The largest packet we can send (changed
         * once we know what the server supports, we
         * get this at connection init).
        private int maxAllowedPacket = 65536;
        private int maxReconnects = 3;
         * The max rows that a result set can contain.
         * Defaults to -1, which according to the JDBC
         * spec means "all".
        private int maxRows = -1;
        private int netBufferLength = 16384;
         * The port number we're connected to
         * (defaults to 3306)
        private int port = 3306;
         * How many queries should we wait before we try to re-connect
         * to the master, when we are failing over to replicated hosts
         * Defaults to 50
        private int queriesBeforeRetryMaster = 50;
         * What should we set the socket timeout to?
        private int socketTimeout = 0; // infinite
         * When did the last query finish?
        private long lastQueryFinishedTime = 0;
         * When did the master fail?
        private long masterFailTimeMillis = 0L;
         * Number of queries we've issued since the master
         * failed
        private long queriesIssuedFailedOver = 0;
         * How many seconds should we wait before retrying to connect
         * to the master if failed over? We fall back when either
         * queriesBeforeRetryMaster or secondsBeforeRetryMaster is
         * reached.
        private long secondsBeforeRetryMaster = 30L;
         * The type map for UDTs (not implemented, but used by
         * some third-party vendors, most notably IBM WebSphere)
        private Map typeMap;
         * Ignore non-transactional table warning for rollback?
        private boolean ignoreNonTxTables = false;
         * Creates a connection to a MySQL Server.
         * @param host the hostname of the database server
         * @param port the port number the server is listening on
         * @param info a Properties[] list holding the user and password
         * @param database the database to connect to
         * @param url the URL of the connection
         * @param d the Driver instantation of the connection
         * @exception java.sql.SQLException if a database access error occurs
        Connection(String host, int port, Properties info, String database,
            String url, NonRegisteringDriver d) throws java.sql.SQLException {
            if (Driver.TRACE) {
                Object[] args = { host, new Integer(port), info, database, url, d };
                Debug.methodCall(this, "constructor", args);
            this.serverVariables = new HashMap();
            hostList = new ArrayList();
            if (host == null) {
                this.host = "localhost";
                hostList.add(this.host);
            } else if (host.indexOf(",") != -1) {
                // multiple hosts separated by commas (failover)
                StringTokenizer hostTokenizer = new StringTokenizer(host, ",", false);
                while (hostTokenizer.hasMoreTokens()) {
                    hostList.add(hostTokenizer.nextToken().trim());
            } else {
                this.host = host;
                hostList.add(this.host);
            hostListSize = hostList.size();
            this.port = port;
            if (database == null) {
                throw new SQLException("Malformed URL '" + url + "'.", "S1000");
            this.database = database;
            this.myURL = url;
            this.myDriver = d;
            this.user = info.getProperty("user");
            this.password = info.getProperty("password");
            if ((this.user == null) || this.user.equals("")) {
                this.user = "nobody";
            if (this.password == null) {
                this.password = "";
            this.props = info;
            initializeDriverProperties(info);
            if (Driver.DEBUG) {
                System.out.println("Connect: " + this.user + " to " + this.database);
            try {
                createNewIO(false);
                this.dbmd = new DatabaseMetaData(this, this.database);
            } catch (java.sql.SQLException ex) {
                cleanup();
                // don't clobber SQL exceptions
                throw ex;
            } catch (Exception ex) {
                cleanup();
                StringBuffer mesg = new StringBuffer();
                if (!useParanoidErrorMessages()) {
                    mesg.append("Cannot connect to MySQL server on ");
                    mesg.append(this.host);
                    mesg.append(":");
                    mesg.append(this.port);
                    mesg.append(".\n\n");
                    mesg.append("Make sure that there is a MySQL server ");
                    mesg.append("running on the machine/port you are trying ");
                    mesg.append(
                        "to connect to and that the machine this software is "
                        + "running on ");
                    mesg.append("is able to connect to this host/port "
                        + "(i.e. not firewalled). ");
                    mesg.append(
                        "Also make sure that the server has not been started "
                        + "with the --skip-networking ");
                    mesg.append("flag.\n\n");
                } else {
                    mesg.append("Unable to connect to database.");
                mesg.append("Underlying exception: \n\n");
                mesg.append(ex.getClass().getName());
                throw new java.sql.SQLException(mesg.toString(), "08S01");
         * If a connection is in auto-commit mode, than all its SQL
         * statements will be executed and committed as individual
         * transactions.  Otherwise, its SQL statements are grouped
         * into transactions that are terminated by either commit()
         * or rollback().  By default, new connections are in auto-
         * commit mode.  The commit occurs when the statement completes
         * or the next execute occurs, whichever comes first.  In the
         * case of statements returning a ResultSet, the statement
         * completes when the last row of the ResultSet has been retrieved
         * or the ResultSet has been closed.  In advanced cases, a single
         * statement may return multiple results as well as output parameter
         * values.  Here the commit occurs when all results and output param
         * values have been retrieved.
         * <p><b>Note:</b> MySQL does not support transactions, so this
         *                 method is a no-op.
         * @param autoCommit - true enables auto-commit; false disables it
         * @exception java.sql.SQLException if a database access error occurs
        public void setAutoCommit(boolean autoCommit) throws java.sql.SQLException {
            if (Driver.TRACE) {
                Object[] args = { new Boolean(autoCommit) };
                Debug.methodCall(this, "setAutoCommit", args);
            checkClosed();
            if (this.transactionsSupported) {
                // this internal value must be set first as failover depends on it
                // being set to true to fail over (which is done by most
                // app servers and connection pools at the end of
                // a transaction), and the driver issues an implicit set
                // based on this value when it (re)-connects to a server
                // so the value holds across connections
                this.autoCommit = autoCommit;
                String sql = "SET autocommit=" + (autoCommit ? "1" : "0");
                execSQL(sql, -1, this.database);
            } else {
                if ((autoCommit == false) && (this.relaxAutoCommit == false)) {
                    throw new SQLException("MySQL Versions Older than 3.23.15 "
                        + "do not support transactions", "08003");
                } else {
                    this.autoCommit = autoCommit;
            return;
         * gets the current auto-commit state
         * @return Current state of the auto-commit mode
         * @exception java.sql.SQLException (why?)
         * @see setAutoCommit
        public boolean getAutoCommit() throws java.sql.SQLException {
            if (Driver.TRACE) {
                Object[] args = new Object[0];
                Debug.methodCall(this, "getAutoCommit", args);
                Debug.returnValue(this, "getAutoCommit",
                    new Boolean(this.autoCommit));
            return this.autoCommit;
         * A sub-space of this Connection's database may be selected by
         * setting a catalog name.  If the driver does not support catalogs,
         * it will silently ignore this request
         * <p><b>Note:</b> MySQL's notion of catalogs are individual databases.
         * @param catalog the database for this connection to use
         * @throws java.sql.SQLException if a database access error occurs
        public void setCatalog(String catalog) throws java.sql.SQLException {
            if (Driver.TRACE) {
                Object[] args = { catalog };
                Debug.methodCall(this, "setCatalog", args);
            checkClosed();
            String quotedId = this.dbmd.getIdentifierQuoteString();
            if ((quotedId == null) || quotedId.equals(" ")) {
                quotedId = "";
            StringBuffer query = new StringBuffer("USE ");
            query.append(quotedId);
            query.append(catalog);
            query.append(quotedId);
            execSQL(query.toString(), -1, catalog);
            this.database = catalog;
         * Return the connections current catalog name, or null if no
         * catalog name is set, or we dont support catalogs.
         * <p><b>Note:</b> MySQL's notion of catalogs are individual databases.
         * @return the current catalog name or null
         * @exception java.sql.SQLException if a database access error occurs
        public String getCatalog() throws java.sql.SQLException {
            if (Driver.TRACE) {
                Object[] args = new Object[0];
                Debug.methodCall(this, "getCatalog", args);
                Debug.returnValue(this, "getCatalog", this.database);
            return this.database;
         * DOCUMENT ME!
         * @return DOCUMENT ME!
        public boolean isClosed() {
            if (Driver.TRACE) {
                Object[] args = new Object[0];
                Debug.methodCall(this, "isClosed", args);
                Debug.returnValue(this, "isClosed", new Boolean(this.isClosed));
            return this.isClosed;
         * Returns the character encoding for this Connection
         * @return the character encoding for this connection.
        public String getEncoding() {
            return this.encoding;
         * @see Connection#setHoldability(int)
        public void setHoldability(int arg0) throws SQLException {
            // do nothing
         * @see Connection#getHoldability()
        public int getHoldability() throws SQLException {
            return ResultSet.CLOSE_CURSORS_AT_COMMIT;
         * NOT JDBC-Compliant, but clients can use this method
         * to determine how long this connection has been idle.
         * This time (reported in milliseconds) is updated once
         * a query has completed.
         * @return number of ms that this connection has
         * been idle, 0 if the driver is busy retrieving results.
        public long getIdleFor() {
            if (this.lastQueryFinishedTime == 0) {
                return 0;
            } else {
                long now = System.currentTimeMillis();
                long idleTime = now - this.lastQueryFinishedTime;
                return idleTime;
         * Should we tell MySQL that we're an interactive client
         * @return true if isInteractiveClient was set to true.
        public boolean isInteractiveClient() {
            return isInteractiveClient;
         * A connection's database is able to provide information describing
         * its tables, its supported SQL grammar, its stored procedures, the
         * capabilities of this connection, etc.  This information is made
         * available through a DatabaseMetaData object.
         * @return a DatabaseMetaData object for this connection
         * @exception java.sql.SQLException if a database access error occurs
        public java.sql.DatabaseMetaData getMetaData() throws java.sql.SQLException {
            checkClosed();
            return new DatabaseMetaData(this, this.database);
         * You can put a connection in read-only mode as a hint to enable
         * database optimizations
         * <B>Note:</B> setReadOnly cannot be called while in the middle
         * of a transaction
         * @param readOnly - true enables read-only mode; false disables it
         * @exception java.sql.SQLException if a database access error occurs
        public void setReadOnly(boolean readOnly) throws java.sql.SQLException {
            if (Driver.TRACE) {
                Object[] args = { new Boolean(readOnly) };
                Debug.methodCall(this, "setReadOnly", args);
                Debug.returnValue(this, "setReadOnly", new Boolean(readOnly));
            checkClosed();
            this.readOnly = readOnly;
         * Tests to see if the connection is in Read Only Mode.  Note that
         * we cannot really put the database in read only mode, but we pretend
         * we can by returning the value of the readOnly flag
         * @return true if the connection is read only
         * @exception java.sql.SQLException if a database access error occurs
        public boolean isReadOnly() throws java.sql.SQLException {
            if (Driver.TRACE) {
                Object[] args = new Object[0];
                Debug.methodCall(this, "isReadOnly", args);
                Debug.returnValue(this, "isReadOnly", new Boolean(this.readOnly));
            return this.readOnly;
         * @see Connection#setSavepoint()
        public java.sql.Savepoint setSavepoint() throws SQLException {
            throw new NotImplemented();
         * @see Connection#setSavepoint(String)
        public java.sql.Savepoint setSavepoint(String arg0)
            throws SQLException {
            throw new NotImplemented();
         * DOCUMENT ME!
         * @return DOCUMENT ME!
        public TimeZone getServerTimezone() {
            return this.serverTimezone;
         * DOCUMENT ME!
         * @param level DOCUMENT ME!
         * @throws java.sql.SQLException DOCUMENT ME!
        public void setTransactionIsolation(int level) throws java.sql.SQLException {
            if (Driver.TRACE) {
                Object[] args = { new Integer(level) };
                Debug.methodCall(this, "setTransactionIsolation", args);
            checkClosed();
            if (this.hasIsolationLevels) {
                StringBuffer sql = new StringBuffer(
                        "SET SESSION TRANSACTION ISOLATION LEVEL ");
                switch (level) {
                case java.sql.Connection.TRANSACTION_NONE:
                    throw new SQLException("Transaction isolation level "
                        + "NONE not supported by MySQL");
                case java.sql.Connection.TRANSACTION_READ_COMMITTED:
                    sql.append("READ COMMITTED");
                    break;
                case java.sql.Connection.TRANSACTION_READ_UNCOMMITTED:
                    sql.append("READ UNCOMMITTED");
                    break;
                case java.sql.Connection.TRANSACTION_REPEATABLE_READ:
                    sql.append("REPEATABLE READ");
                    break;
                case java.sql.Connection.TRANSACTION_SERIALIZABLE:
                    sql.append("SERIALIZABLE");
                    break;
                default:
                    throw new SQLException("Unsupported transaction "
                        + "isolation level '" + level + "'", "S1C00");
                execSQL(sql.toString(), -1, this.database);
                isolationLevel = level;
            } else {
                throw new java.sql.SQLException("Transaction Isolation Levels are "
                    + "not supported on MySQL versions older than 3.23.36.", "S1C00");
         * Get this Connection's current transaction isolation mode.
         * @return the current TRANSACTION_* mode value
         * @exception java.sql.SQLException if a database access error occurs
        public int getTransactionIsolation() throws java.sql.SQLException {
            if (Driver.TRACE) {
                Object[] args = new Object[0];
                Debug.methodCall(this, "getTransactionIsolation", args);
                Debug.returnValue(this, "getTransactionIsolation",
                    new Integer(isolationLevel));
            if (this.hasIsolationLevels) {
                 java.sql.Statement stmt = null;
                 java.sql.ResultSet rs = null;
                 try {
                      stmt = this.createStatement();
                      String query = null;
                      if (this.io.versionMeetsMinimum(4, 0, 3)) {
                           query = "SHOW VARIABLES LIKE 'tx_isolation'";
                      } else {
                           query = "SHOW VARIABLES LIKE 'transaction_isolation'";
                      rs = stmt.executeQuery(query);
                      if (rs.next()) {
                           String s = rs.getString(2);
                           if (s != null) {
                                  Integer intTI = (Integer) mapTransIsolationName2Value.get(s);
                                  if (intTI != null) {
                                       return intTI.intValue();
                           throw new SQLException("Could not map transaction isolation '" + s + " to a valid JDBC level.", "S1000");
                      } else {
                           throw new SQLException("Could not retrieve transaction isolation level from server", "S1000");
                 } finally {
                      if (rs != null) {
                           try {
                                rs.close();
                           } catch (Exception ex) {
                                // ignore
                           rs = null;
                      if (stmt != null) {
                           try {
                                stmt.close();
                           } catch (Exception ex) {
                                // ignore
                           stmt = null;
            return isolationLevel;
         * JDBC 2.0
         * Install a type-map object as the default type-map for
         * this connection
         * @param map the type mapping
         * @throws SQLException if a database error occurs.
        public void setTypeMap(java.util.Map map) throws SQLException {
            this.typeMap = map;
         * JDBC 2.0
         * Get the type-map object associated with this connection.
         * By default, the map returned is empty.
         * @return the type map
         * @throws SQLException if a database error occurs
        public synchronized java.util.Map getTypeMap() throws SQLException {
            if (this.typeMap == null) {
                this.typeMap = new HashMap();
            return this.typeMap;
         * The first warning reported by calls on this Connection is
         * returned.
         * <B>Note:</B> Sebsequent warnings will be changed to this
         * java.sql.SQLWarning
         * @return the first java.sql.SQLWarning or null
         * @exception java.sql.SQLException if a database access error occurs
        public java.sql.SQLWarning getWarnings() throws java.sql.SQLException {
            if (Driver.TRACE) {
                Object[] args = new Object[0];
                Debug.methodCall(this, "getWarnings", args);
                Debug.returnValue(this, "getWarnings", null);
            return null;
         * Allow use of LOAD LOCAL INFILE?
         * @return true if allowLoadLocalInfile was set to true.
        public boolean allowLoadLocalInfile() {
            return this.allowLoadLocalInfile;
         * DOCUMENT ME!
         * @return DOCUMENT ME!
        public boolean capitalizeDBMDTypes() {
            return this.capitalizeDBMDTypes;
         * After this call, getWarnings returns null until a new warning
         * is reported for this connection.
         * @exception java.sql.SQLException if a database access error occurs
        public void clearWarnings() throws java.sql.SQLException {
            if (Driver.TRACE) {
                Object[] args = new Object[0];
                Debug.methodCall(this, "clearWarnings", args);
            // firstWarning = null;
         * In some cases, it is desirable to immediately release a Connection's
         * database and JDBC resources instead of waiting for them to be
         * automatically released (                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      

  • JDBC 2.0 - Dynamic cursors

    Hi,
    I am trying to create a cursor, and i need to use some
    features of JDBC 2 like "scrolling backwards" and updating
    data from cursor relative position, but
    i got an exception, and e.printStack() infromed me
    this feature was not "yet" implemented.
    // ResultSet.afterLast() and ResultSet.previous()
    // raise an SQLException
    Is there any update that can "already" do it
    (FULL JDBC 2 implementation )?
    I would like to have it for 8.1.5/Solaris AND Lite/Win.
    Regards,
    Txr
    null

    Jose,
    Openlink Software provides full JDBC 2.0 compliancy - visit
    http://www.openlinksw.com for more information. Pay particular
    attention to the RowSetDemo applet if you download; Openlink's
    Rowset class will provide the functionality you require. All
    demos provide source code for your adapting purposes.
    Good luck!
    Jose Teixeira (guest) wrote:
    : Hi,
    : I am trying to create a cursor, and i need to use some
    : features of JDBC 2 like "scrolling backwards" and updating
    : data from cursor relative position, but
    : i got an exception, and e.printStack() infromed me
    : this feature was not "yet" implemented.
    : // ResultSet.afterLast() and ResultSet.previous()
    : // raise an SQLException
    : Is there any update that can "already" do it
    : (FULL JDBC 2 implementation )?
    : I would like to have it for 8.1.5/Solaris AND Lite/Win.
    : Regards,
    : Txr
    null

  • Content Scrolling is Inverse of Spaces Scrolling

    This has got to be the most unintuitive design decision I have ever come across... Affects OSX Lion.
    This is what is happening.
    With natural scrolling enabled:
    Swiping left in a text viewer will move the content left / scroll the content right - this is correct.
    Swiping left in mission control will move the space right / select the left space.
    Swiping left in a system preferences control will move the the control right / select the parent/left control.
    With natural scrolling disabled it is the exact opposite:
    Swiping left in a text viewer will move the content right / scroll the content left - this is correct.
    Swiping left in mission control will move the space left / select the right space.
    Swiping left in a system preferences control will move the the control left / select the child/right control.
    What I expect is for the swiping direction to be consistent between content and controls and spaces.
    With natural scrolling enabled:
    Swiping left in a text viewer will move the content left / scroll the content right.
    Swiping left in mission control will move the space left / select the right space.
    Swiping left in a system preferences control will move the the control left / select the child/right control.
    With natural scrolling disabled:
    Swiping left in a text viewer will move the content right / scroll the content left.
    Swiping left in mission control will move the space right / select the left space.
    Swiping left in a system preferences control will move the the control right / select the parent/left control.
    Can this please be resolved. It's really doing my head in.

    Ahh, yes.
    Ah, but I would disagree.
    I would say that Aaron Johns is, in this ancient post, talking about the broken, backwards scrolling (which we're all now used to) that has been around forever – and that Apple is trying to 'fix' with its natural scrolling in Lion:
    I know, that's what I'm saying, I think it should be. For two finger 'scrolling' the current behavior is OK, because you're effectively controlling the 'scroll bars', but for three finger 'swiping' I think it should be like the iPhone, swipe left... page goes left, swipe right... page goes right, same for up and down. Just seems more natural to me. What am I missing?
    Bear with me...
    This comes from the fact that the original idea of scrolling-with-a-gesture came from the mouse wheel... Moving the top of the mouse wheel toward you (down) "felt" like the bottom of the mouse wheel was pushing the 'paper' on the screen upward.
    When we started translating this behavior to trackpads, we kept the same motion because it's what we were used to – but Aaron is right; there's a weird disconnect with a trackpad because although we are conceptually moving "forward" and therefore "right", we are pushing our finger physically in one direction and watching something move in another direction.
    Apple's whole interaction model with Lion is iPad-like, in that if you swipe a finger right, you are not "moving forward", but moving the thing-that-you-are-touching to the right. (How weird would it be if you placed your finger on your iPhone or iPad screen, moved to the right... and all the icons moved left? The reason an iPad feels so natural that a 2-year-old can use it is precisely because it works the same way the physical world does.)
    Lion is a move to unify the motions, so using a trackpad uses the same motions that using a touchscreen would... as though you are physically touching your data and moving it around on the screen.

  • Lion broke scroll wheel Razer DeathAdder

    After upgrading to Lion my Razer DeathAdder mouse can't scroll using the mouse wheel. I'm hoping that Razer will release an updated driver, but in the mean time does anyone have any work arounds? Anyone else seeing the same problem? Note: this isn't about the new "backwards" scrolling in Lion. It doesn't scroll at all in any direction on any page or application.
    My only work around so far is to set the scroll directions to be Macros, scroll up = Up Arrow, scroll down = Down arrow. It just works ok but it is certainly not ideal. It doesn't work right in a good many scenarios.

    I forgot to reply to this thread; I figured out what my problem was. In the Driver Application, beneath the button selection, there's an Advanced Mousewheel Options which I hadn't noticed and assumed was just a graphic.  The scroll wheel was set by default to left click when I scrolled up, and right click when I scrolled down.
    In response to HimynameisJoe, in case you misunderstand how it works, here is what you do to program the buttons:
    1. Select the button from the main window area (1 -- 5)
    2. A dropdown menu appears on that button's selection area.
    3. Select whatever setting as which you want it to operate, for example, Primary Click, Secondary Click, Pass-through, Advanced Buttons, Button Off.
    4. If you want to use the 3rd, 4th and 5th as extra buttons for different apps, for example, for FPS games or WoW, then select Pass-through.  This worked for me easily with Snow Leopard, however, I've yet to have it work in Lion.
    5. If you want to use a button for a single key such as F5 or the Fn key, or you want to set a key as a macro, select Advanced Functions.  This will open the pane which I suspect you're having trouble accessing.
    For anyone who's having trouble with the new reversed scrolling and has both a mouse and a trackpad, (such as use of a MacBook) then I have worked out a nice compromise: 
    1. Enable the reversed scrolling which allows the iOS-like trackpad scrolling which will make the trackpad really intuitive to use.
    2. Go to the Driver settings for the Deathadder and change the Advanced Mousewheel Options.  Change the the upward scroll motion to Scroll Down and the downward scroll option to Scroll Up. 

Maybe you are looking for

  • I can no longer connect to my pc home sharing

    I have been using my itunes on my HTPC as my media server for my atv2 for months without issue, but after a power outage i can no longer connect to my HTPC.  It shows up under "computers" but it will not connect.  I didn't change any firewall setting

  • Different Pricing date for two line items

    Hi guru's How to give different pricing dates for two line items in a sales order To elaborate I have two line items one i need pricing date order date second one i need pricing date should be delivery date Thanks in advance Srinivas

  • How do I restore my Mac to 10.4.11 after a crash?

    I downloaded an old platform game--OS 8 or 9--and was happily playing along when I decided to switch the game to full screen, I was having so much fun. System crashed and now the Finder is 10.4.7 while all else appears to be 10.4.11. I now have a flo

  • Acrobat reader for N80????is it available

    i am interested in getting the acrobat reader for my N80 phone...is it available???thanks

  • Help suming query fields

    i have this query that produces the first three columns below. I would like to add a fourth column (Not in the database just in a display). This fourth column will store a running total of the order Qty of each ordered item for a specific contract. C