Java odcb statment "LIKE" causing problems

I'm working on some java+ odbc and i'm trying to execture a query,
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                String dataSourceName = "sgdat";
                String dbURL = "jdbc:odbc:" + dataSourceName;
                Connection con = DriverManager.getConnection(dbURL, "","");
                Statement s = con.createStatement();
                ResultSet rs = s.executeQuery("SELECT s.id, s.name FROM s ");This works fine, however when i add the Statement LIKE things go wrong, i dont get any results back into rs
ResultSet rs = s.executeQuery("SELECT s.id, s.name FROM s LIKE '55*' ;");
When i run this query in Access, it displays fine, but copy pasting this into java doesnt work.
I'm guessing it's the '' quotation marks...can anybody help?
Message was edited by:
nonamesir
Message was edited by:
nonamesir

You need a WHERE clause. For example select * from foo where bar like '%baz%'(Note, %, not * for the wildcard.)
Also, you should use a PreparedStatement
PreparedStatement ps = con.prepareStatement("select * from foo where bar like ?");
ps.setString(1, "%baz%");
rs = ps.executeQuery();This prevents SQL injection and prevents you from having to diddle around escaping special SQL characters, formatting dates, etc.

Similar Messages

  • I just updated my latest java but the update is causing problems with some externale devices. So i would like to uninstall this latest java update and get back the previous one. That should solve to problems with my external device

    i just updated my latest java but the update is causing problems with some external devices. So i would like to uninstall this latest java update and get back the previous one. That should solve to problems with my external device.
    Is this possible and how do i do that?
    Anyone who responds thanks for that!
    Juko
    I am running
    Hardware Overview:
      Model Name:          Mac Pro
      Model Identifier:          MacPro1,1
      Processor Name:          Dual-Core Intel Xeon
      Processor Speed:          2,66 GHz
      Number of Processors:          2
      Total Number of Cores:          4
      L2 Cache (per Processor):          4 MB
      Memory:          6 GB
      Bus Speed:          1,33 GHz
      Boot ROM Version:          MP11.005D.B00
      SMC Version (system):          1.7f10
      Serial Number (system):          CK7XXXXXXGP
      Hardware UUID:          00000000-0000-1000-8000-0017F20F82F0
    System Software Overview:
      System Version:          Mac OS X 10.7.5 (11G63)
      Kernel Version:          Darwin 11.4.2
      Boot Volume:          Macintosh HD(2)
      Boot Mode:          Normal
      Computer Name:          Mac Pro van Juko de Vries
      User Name:          Juko de Vries (jukodevries)
      Secure Virtual Memory:          Enabled
      64-bit Kernel and Extensions:          No
      Time since boot:          11 days 20:39
    Message was edited by Host

    Java 6 you can't as Apple maintains it, and Java 7 you could if you uninstall it and Oracle provides the earlier version which they likely won't his last update fixed 37 remote exploits.
    Java broken some software here and there, all you'll have to do is wait for a update from the other parties.

  • Can i download java for my ipad, the problem is i open glovis.usgs from my ipad, but i can't see the full page, cause the page need a java...help me please

    Can i download java for my ipad, the problem is i open glovis.usgs from my ipad, but i can't see the full page, cause the page need a java...help me please

    Nope. The iPad (and iPhone and iPod touch) cannot execute Java applets. It's a limitation in iOS from the beginning (just like lack of Flash). You will either need to use a desktop computer or access a desktop computer via RDP or VNC to access that page on iPad.mIn short: there is no native way to use a Java applet on iOS.

  • Installing "Java for Mac OS X 10.5 Update 6" (1.0) causing problems

    Hi,
    I installed the "Java for Mac OS X 10.5 Update 6" (1.0)" yesterday evening and it caused problems:
    - network
    - date/time screwed up
    - Time Machine crashed
    My environment is a MacBook Pro, running 10.5.8, all latest patches applied. During the install all other applications were closed (my once in three months cleanup of the desktop , Time Machine was not running although it might have kicked in during the download, I left it alone for install and the necessary reboot. I didn't hook it up to the power, had 82% battery left, afterwards (after all repairs) still 76%, so my guess is that is not the root cause, although I did get the power source warning and waved it away during the installs.
    Looking back into the logfiles and using some gut-feeling I do think somehow the date/time seeting was screwed up and caused all other problems. The date was reset to the famous Unix starttime, Jan 1, 1970. At first I didn't notice, only after my network (Airport Extreme based) asked me WPA password and then complained about the date/time I noticed something weird.
    After resetting date/time, verifying the disk for problems (none found), re-entering the WPA password, network ran again, had to re-connect with the Time Capsule and check the sparse backup-volume there before I got everything up-and-running again.
    Not a very big deal, but annoying, and certainly something wrong in the update here.
    Anyone any explains ?
    Regards,
    Wim.

    Sorry if I missed it...have you scoured logs for anything that might shed light on success/fail during the install?

  • I want to uninstall ReloadEvery as I think it is causing problems however it is not in my list of Extensions or Plugins yet it is clearly installed, I tried reinstalling FF but it was still there! How can I get rid of it?

    I installed ReloadEvery a while ago and it seemed to be working fine however I am now having problems with FF crashing and weird things like pages not reloading and not being able to use the back button etc
    I have already tried uninstalling and reinstalling FF and upgrading to FF 4.
    When I upgraded to FF 4 I was still having problems even though I didn't have any Extensions installed at all, or so I thought. I noticed that ReloadEvery was still installed. I was rather puzzled as I had done a clean install of FF 4. I want to remove ReloadEvery to see if it will solve my problems.
    I have also tried following the help on the FF Troubleshooting about manually uninstalling Extensions but again ReloadEvery not listed there yet I am still able to use it in FF!
    I want to get rid of it!! I really need some help please.

    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    *Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Tools > Options > Privacy > Cookies: "Show Cookies"
    If clearing cookies doesn't work then it is possible that the <i>cookies.sqlite</i> file that stores the cookies is corrupted.
    Rename (or delete) <b>cookies.sqlite</b> (cookies.sqlite.old) and delete other present cookie files like <b>cookies.sqlite-journal</b> in the Firefox Profile Folder in case the file cookies.sqlite got corrupted.
    *http://kb.mozillazine.org/Cookies

  • FF 3.6 AND 5 on same Mac, 1 profile - can I uninstall 5 without causing problems running 3.6 or with the profile?

    I upgraded from 3.6.16 to 5, but don't like how 5 handles tabs (auto reloading 'problem loading' tabs when internet connection is reestablished). So I installed 3.6 in a separate folder, e.g. both versions are on this computer. I went back to using 3.6, and let it upgrade to either 3.6.18 or 19 (don't recall which & it's not open right now). I'm having problems with it using too much CPU & Memory, and not sure if that's a difference between 3.6.16 & 3.6.18/19, or if having 5 on the same computer even if closed could be causing the problem.
    Can I uninstall 5 without causing problems with the 3.6 version and the single profile?

    If you haven't tried this, give it a try. It worked for me, hopefully it will work for you. In your version 3 firefox, disable all extensions, I had two plugins (doubletwist and joost, disable those if you have them). Then install firefox 5 by overwriting your version 3 firefox. It should work fine after that. I tried everything before, I gave that a last ditch shot. Oh yeah, before you install firefox 5, clear your cache of everything just to be sure.
    Hopefully that helps.

  • I have two Iphones with different email addresses sharing one Apple ID. Will that cause problems with using messaging and FaceTime?

    I have two Iphones 5 with different email addresses sharing one Apple ID account.Both are using IOS 8.
    I would like to set up a new Apple Id for one of the phones and remove it from the old account.
    If I do that, can I move all of the purchased apps and songs to the new Apple account?
    Also, will sharing one Apple ID account with two devices cause problems with using messaging and FaceTime?

    Sharing an iCloud account between two devices can be done without causing issues with iMessage and FaceTime, just go into Settings for each of these functions and designate separate points of contact (i.e. phone number only, or phone number and unique email address).  While that works, you'll then face the problem where a phone call to one iPhone will ring both if on the same Wi-Fi network -- but again, that can be avoided by changing each phone's settings.
    Rather than do all that, don't fight it -- use separate IDs for iCloud.  You can still use a common ID for iTunes purchases (the ID for purchases and iCloud do not have to be the same) or you can use Family Sharing to share purchases from a primary Apple account.

  • TS3579 I found this useful because I did not know about the effect of typing in data and that you could only drag to rearrange the data.  I had typed in data before and this had caused problems but restoring defaults did not cause correct dates to show up

    I found this  (TS3579: If the wrong date or time is displayed in some apps on your Mac Learn about If the wrong date or time is displayed in some apps on your Mac) useful because I did not know about the effect of typing in data and that you could only drag to rearrange the data.  I had typed in data before and this had caused problems but restoring defaults did not cause correct dates to show up in Finder. 

    It sounds like there are a couple things going on here.  First check if you have a successful install of SQL Server, then we'll figure out the connection issues.
    Can you launch SQL Server Configuration Manager and check for SQL Server (MSSQLSERVER) if default instance or SQL Server (other name) if you've configured your instance as a named instance.  Once you find this, make sure the service is started. 
    If not started, try to start it and see if it throws an error.  If you get an error, post the error message your hitting.  If the service starts, you can then launch SSMS and try to connect.  If you have a default instance, you can use the machine
    name in the connection dialog.  Ex:  "COWBOYS" where Cowboys is the machine name.  However, if you named the SQL Server instance during install, you'll need to connect using the machine\instance format.  Ex:  COWBOYS\Romo (where Romo
    is the instance name you set during install).
    You can also look at the summary.txt file in the SQL Server setup error logs to see what happened on the most recent install.  Past install history is archived in the log folder if you need to dig those up to help troubleshoot, but the most
    recent one may help get to the bottom of it if there is an issue with setup detecting a prior instance that needs to be repaired.
    Thanks,
    Sam Lester (MSFT)
    http://blogs.msdn.com/b/samlester
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click
    "Mark as Answer" and
    "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

  • JTree + FK with same value causing problems

    Hi
    I can't figure this out. If I create biz components for 2 tables having a parent-child relationship and a jTree with appropriate rules, things are ok only if the parent's id are of different values than the child. When parent.id and child.id have the same values the jTree seems to recursively fire valueChanged() at strange times.
    Example:
    CREATE TABLE PARENT
    PARENT_ID NUMBER CONSTRAINT PARENT_ID_NN NOT NULL,
    PARENT_NAME VARCHAR2(40 BYTE),
    CONSTRAINT PARENT_C_ID_PK
    PRIMARY KEY
    (PARENT_ID)
    CREATE TABLE CHILD
    CHILD_ID NUMBER CONSTRAINT CHILD_ID_NN NOT NULL,
    CHILD_NAME VARCHAR2(40 BYTE),
    PARENT_ID NUMBER,
    CONSTRAINT CHILD_C_ID_PK
    PRIMARY KEY
    (CHILD_ID)
    ALTER TABLE CHILD ADD (
    CONSTRAINT PARENT_FK
    FOREIGN KEY (PARENT_ID)
    REFERENCES PARENT (PARENT_ID));
    INSERT INTO PARENT VALUES (1, 'Parent 1');
    INSERT INTO PARENT VALUES (2, 'Parent 2');
    INSERT INTO PARENT VALUES (3, 'Parent 3');
    INSERT INTO CHILD VALUES (100, 'Child A', 1);
    INSERT INTO CHILD VALUES (200, 'Child B', 2);
    INSERT INTO CHILD VALUES (300, 'Child C', 3);
    I use the JDev 10.1.2 wizard to create biz components and test the AppMod to make sure the link works. Now I create a blank panel and drag over the ParentView data control. Using the jTree tree binding editor I create two rules:
    1) DataCollectionDef.ParentView - DisplayAttribute.ParentName - BranchRuleAccessor.ChildView
    2) DataCollectionDef.ChildView - DisplayAttribute.ChildName
    Now I add a tree selection listener:
    jTree1.addTreeSelectionListener(new TreeSelectionListener()
    public void valueChanged(TreeSelectionEvent e)
    DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)jTree1.getLastSelectedPathComponent();
    if (selectedNode != null)
    System.out.println(selectedNode.getUserObject().toString());
    When I run my panel and watch in JDev everything is fine, i.e. nothing is printed to the screen when it first loads and when I click a node, the correct UserObject prints.
    Here's the rub, now I close the panel and update my child table as follows:
    UPDATE pdssuser.child SET child_id = 1 WHERE child_id = 100;
    UPDATE pdssuser.child SET child_id = 2 WHERE child_id = 200;
    UPDATE pdssuser.child SET child_id = 3 WHERE child_id = 300;
    This time, when I run my panel, the console shows that valueChanged() has been fired 3 times on load:
    Parent 1
    Parent 2
    Parent 3
    This behavior is causing problems with my real tree.
    I haven't had any luck finding threads about this. Any ideas?
    Thanks
    John

    ok, last one (i hope)
    The same issue occurs with 10.1.2.1
    ...but changing the location where I add the treeSelectionListener to after setBindingContext() seems to fix the problem.
    The second call to panelBinding.refreshControl() in setBindingContext() (the one after the call to jbinit()) is what fires the valueChanged events. Somewhere in there, DCBindingContainer.java or DCIteratorBinding.java, the treeSelectionListener is hearing that a value changed (maybe due to a query execution?). I guess the jTree1.setModel(...) call in jbinit() simply sets up the tree but the VO queries described in the Branch Rule accessors are executed on the refreshControl.....i'm out of my comfort zone here and may be confusing you with my "troubleshooting" so I'll just tell you my work-around.
    So to fix it I add the treeSelectionListener in my main method (not jbinit()) after the setBindingContext() has been called.
    I still have no idea why the FK triggers this behavior...but at least it's working.
    * the main method
    public static void main(String [] args)
    try
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    catch(Exception exemp)
    exemp.printStackTrace();
    Panel1 panel = new Panel1();
    panel.setBindingContext(JUTestFrame.startTestFrame("DataBindings.cpx", "null", panel, panel.getPanelBinding(), new Dimension(400, 300)));
    panel.revalidate();
    // Now add the treeSelectionListener
    panel.addSelectionListener();
    * the JbInit method
    public void jbInit() throws Exception
    this.setLayout(borderLayout1);
    this.add(jTree1, BorderLayout.CENTER);
    jTree1.setModel((TreeModel)panelBinding.bindUIControl("ParentView1", jTree1));
    // DON'T ADD treeSelectionListener here
    * Add the selection listener to the tree
    public void addSelectionListener()
    jTree1.addTreeSelectionListener(new TreeSelectionListener()
    public void valueChanged(TreeSelectionEvent e)
    DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)jTree1.getLastSelectedPathComponent();
    if (selectedNode != null)
    System.out.println(selectedNode.getUserObject().toString());
    }

  • Will multiple Lan cards cause problems using rmi?

    Will multiple Lan cards cause problems using rmi? If a host has two or more network cards (only one of which is Internet-enabled), how does RMI know which IP address to use? There seems to be a problem when such a client registers with an RMI service, and has a client-side callback method invoked by the server.

    You can tell RMI the address you want by defining java.rmi.server.hostname at the JVM which exports the remote object.

  • Quotation and Purchasing Requisition causing problem

    Dear all,
    I need to seek your advise.
    It is causing problems in the supply chain that quatations and purchace requisitions is causing production order creation in the workshop at the distribution center and in the SAP factories.
    We would really want these two order types/demands isn't valid for the production planning as it is often result in production where orders never are converted.
    Questions:
    1 - Is it advisable to exclude these two demands (i.e. Quotation/PR) from production point of views? if no, why, what's the reason?
    2 - Either Yes or no on question 1,  would it be possible to exclude these as demands for production so that only actual orders causes production order creation from the system config?
    3 - If question no.1 is "Not advisable", what is the alternative solution to solve our problem (i.e. it is often result in production where orders never are converted).
    Thanks.

    1) I would like to ensure that our Quotation (MM/SD)/ PR (SD derived PR example drop ship, and MM derived PR, example STO PR) to be excluded as demand during MRP run. And the best way is to use the BADI - MD_CHANGE_MRP_DATA. Is that correct?
    Yes the BADI is provided as the exclusion of these demands in planning is not considered as standard & hence the enhancement.
    2) Does this BADI- MD_CHANGE_MRP_DATA work for exclusion of Quotation as demand as well?
    I have written code in this BADI to exclude Stock Transfer PR, but not for quotation so cant speak from experience on that. But I am sure one of the methods in that BADI should cover that. Discuss with your abaper & he / she will let you know which method will cover this need
    3) Any other way?
    To the best of what I know usage of BADI is the only option to prevent planning of demands coming from STO's. But the other way would be, to work with PO - SO kind of concept i.e. the plant which requires a part from another plant will raise a PO, this will then have to manually entered in the other plant as a SO (But note, creating sales order for plants within same company code will violate some norms in Finance, so check with your FI-CO colleagues)

  • WE + CE cause problem with accented characters

    While creating a CFF font which contains the WE as well as the CE character set, it causes problems with most of Adobe programs (Photoshop 7, Illustrator 10, Photoshop Elements 2.0) under Mac OS X. Problem: the accented characters get replaced by Helvetica (Photoshop) or Myriad (Illustrator). Only InDesign treats it right.
    I tested under Mac OS X 10.2 as well as 10.3; no difference. I tested on 'old machines', but fresh machines as well (machines which didn't have the fonts installed before); no difference. All the same problem.
    Deleting the CE characters solves the problem, but yeah, I want to create a CFF font which contains both character sets.
    Generating the font in FontLab or FDK doesn't make any difference.
    So, what's the solution? Sounds like a mystery.
    Bas

    Two comments:
    OpenType/CFF fonts should work to some degree on versions of Mac OS from 8.x on. "Some degree" means that pre-Mac OSX, you need ATM for them to work, and you only get the Roman char set. On Mac OSX, Unicode savvy apps will give you access to the entire charset, but at the moment only Adobe apps support any OpenType features.
    About your problem with CE charset: this is a known problem, and is still a mystery. Adam Twardoch has reported the same problem and has supplied some test fonts. I have spent over a day looking over the fonts, and looking into old code, and can't find any problem in the font data. Investigating further is likely to be a several day effort, and will happen, but not soon.

  • ./opmnctl causing problems

    I am not sure if this is the right forum - but maybe someone can point me into the rigth direction.
    Since installing APEX 3.0 and APACHE I do have problems to run other (java) processes which had no problems for over a year.
    Trying to run a java program I get the following error:
    start crs2ic: Do Apr 19 13:35:00 CEST 2007
    java.sql.SQLException: E/A-Exception: The Network Adapter could not establish the connection
              at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
              at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
              at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
              at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:404)
              at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
              at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
              at java.sql.DriverManager.getConnection(DriverManager.java:512)
              at java.sql.DriverManager.getConnection(DriverManager.java:193)
              at at.cati.infocenter.db.DBConnection.Init(DBConnection.java:47)
              at at.sis.cati.crs2ic.crs2ic.<init>(crs2ic.java:38)
              at at.sis.cati.crs2ic.crs2ic.main(crs2ic.java:476)
    end crs2ic: Do Apr 19 13:35:04 CEST 2007
    After shuting down Apache with opmnctl shutdown I can start the java process without any problems.
    - what can cause this situation
    - where to go for more help
    regards
    friedrich

    I am not sure if this is the right forum - but maybe someone can point me into the rigth direction.
    Since installing APEX 3.0 and APACHE I do have problems to run other (java) processes which had no problems for over a year.
    Trying to run a java program I get the following error:
    start crs2ic: Do Apr 19 13:35:00 CEST 2007
    java.sql.SQLException: E/A-Exception: The Network Adapter could not establish the connection
              at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
              at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
              at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
              at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:404)
              at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
              at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
              at java.sql.DriverManager.getConnection(DriverManager.java:512)
              at java.sql.DriverManager.getConnection(DriverManager.java:193)
              at at.cati.infocenter.db.DBConnection.Init(DBConnection.java:47)
              at at.sis.cati.crs2ic.crs2ic.<init>(crs2ic.java:38)
              at at.sis.cati.crs2ic.crs2ic.main(crs2ic.java:476)
    end crs2ic: Do Apr 19 13:35:04 CEST 2007
    After shuting down Apache with opmnctl shutdown I can start the java process without any problems.
    - what can cause this situation
    - where to go for more help
    regards
    friedrich

  • Opmnctl causes problems

    I am not sure if this is the right forum - but maybe someone can point me into the rigth direction.
    Since installing APEX 3.0 and APACHE I do have problems to run other (java) processes which had no problems for over a year.
    Trying to run a java program I get the following error:
    start crs2ic: Do Apr 19 13:35:00 CEST 2007
    java.sql.SQLException: E/A-Exception: The Network Adapter could not establish the connection
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:404)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
    at java.sql.DriverManager.getConnection(DriverManager.java:512)
    at java.sql.DriverManager.getConnection(DriverManager.java:193)
    at at.cati.infocenter.db.DBConnection.Init(DBConnection.java:47)
    at at.sis.cati.crs2ic.crs2ic.<init>(crs2ic.java:38)
    at at.sis.cati.crs2ic.crs2ic.main(crs2ic.java:476)
    end crs2ic: Do Apr 19 13:35:04 CEST 2007
    After shuting down Apache with opmnctl shutdown I can start the java process without any problems.
    - what can cause this situation
    - where to go for more help
    regards
    friedrich

    Yes I can send the source - but the program is splitt up into many classes
    What it does - it tries to open jdbc connections into our ORACLE DBs
    So will send the main class and the one opening the database connections
    the property parameteres used are:
    # Create Environment-Variables f. crs2ic-scripts
    export CRS2IC_HOME=/home/crs2ic
    export CRS2IC_JDBC_DRIVER=oracle.jdbc.driver.OracleDriver
    export CRS2IC_JDBC_CONNECTION_CRS2IC=jdbc:oracle:thin:crs2ic/[email protected]:1521:OKVDWH
    export CRS2IC_JDBC_CONNECTION_ICL=jdbc:oracle:thin:icload/[email protected]:1521:OKVDB8
    export CRS2IC_JDBC_CONNECTION_IC=jdbc:oracle:thin:infocenter/[email protected]:1521:OKVDWH
    export [email protected]
    export JWSDP_PATH=/home/crs2ic/jwsdp-1.5
    export JAVA_HOME=/usr/java/j2sdk1.4.2_06
    export NLS_LANG=american_america.UTF8
    package at.cati.infocenter.db;
    import java.sql.CallableStatement;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.SQLException;
    import java.sql.Statement;
    * This class provides a comfortable (wrapping) interface for JDBC-Connection
    * @author Helmut
    public class DBConnection
    private static final int STATE_NEW = 0;
    private static final int STATE_INIT = 1;
    private int state;
    private Connection mDbConn;
    public DBConnection()
    state = STATE_NEW;
    * This method initilized the connection.
    * This must be done before any other operations.
    * @param pConnectionProp Name of the system-property that holds the JDBC connection-string
    * @throws Exception
    public void Init(String pConnectionProp) throws Exception
    String jdbcDriver = System.getProperty("jdbc.driver");
    String jdbcConnection = System.getProperty(pConnectionProp);
    if(jdbcDriver == null)
    throw new Exception("jdbc.driver not defined!");
    if(jdbcConnection == null)
    throw new Exception("jdbc.connection "+pConnectionProp+" not defined!");
    Class.forName(jdbcDriver);
    mDbConn = DriverManager.getConnection(jdbcConnection);
    if(mDbConn.getMetaData().supportsTransactionIsolationLevel(Connection.TRANSACTION_SERIALIZABLE) )
    mDbConn.setAutoCommit(false);
    state = STATE_INIT;
    * This method closes a previously opended (init) connection
    * @throws Exception
    public void Close() throws Exception
    if(state != STATE_INIT)
    throw new Exception("Close called on uninitialized Connection");
    mDbConn.close();
    * This method commits the outstanding transaction
    * @throws Exception
    public void Commit() throws Exception
    if(state != STATE_INIT)
    throw new Exception("Commit called on uninitialized Connection");
    if(mDbConn.getMetaData().supportsTransactionIsolationLevel(Connection.TRANSACTION_SERIALIZABLE) )
    mDbConn.commit();
    * This method is a wrapper for JDBC
    * @param sql
    * @return
    * @throws Exception
    public PreparedStatement prepareStatement(String sql) throws Exception
    if(state != STATE_INIT)
    throw new Exception("prepareStatement called on uninitialized Connection");
    return(mDbConn.prepareStatement(sql));
    * This method is a wrapper for JDBC
    * @param pStrStmt
    * @return
    * @throws Exception
    public CallableStatement prepareCall(String pStrStmt) throws Exception
    CallableStatement stmt;
    if(state != STATE_INIT)
    throw new Exception("prepareCall called on uninitialized Connection");
    stmt = mDbConn.prepareCall(pStrStmt);
    return(stmt);
    * This method rolls back the outstanding transaction
    * @throws SQLException
    public void rollback() throws SQLException
    mDbConn.rollback();
    * This method is a wrapper for JDBC
    * @return
    * @throws Exception
    public Statement createStatement() throws Exception
    Statement stmt;
    if(state != STATE_INIT)
    throw new Exception("createStatement called on uninitialized Connection");
    stmt = mDbConn.createStatement();
    return(stmt);
    and this is the main class (snipped part of the program)
    package at.sis.cati.crs2ic;
    import java.io.File;
    import java.sql.PreparedStatement;
    import java.util.Arrays;
    import at.cati.infocenter.db.DBConnection;
    import at.cati.infocenter.db.CtlParameter;
    import at.cati.infocenter.ConcurrentType;
    import at.cati.infocenter.Protocol;
    // scheduled transfer of all CRS Data (Common Risc System) to IC (InfoCenter)
    public class crs2ic
    private DBConnection mDbConnProtCrs2Ic; // Protocol for "outer loop"
    private DBConnection mDbConnCrs2Ic; // prc_crs2load_entity AND Loading of §§
    private DBConnection mDbConnProtCrsPar; // Protocol for Load §-File
    private DBConnection mDbConnLoadIc; // ic_load.load_infocenter
    private DBConnection mDbConnSt2Ic; // prc_st2ic
    private Protocol mProt;
    private String mXmlWorkDirectory;
    private String mXmlArchDirectory;
    private String mParagraphPropertyFile;
    private boolean mDoBu = false;
    private boolean mDoPa = false;
    private boolean mDoRe = false;
    private boolean mDoBux = false;
    private boolean mDoPax = false;
    private boolean mDoEnt = false;
    private boolean mDoPat = false;
    public crs2ic() throws Exception
    mDbConnProtCrs2Ic = new DBConnection();
    mDbConnProtCrs2Ic.Init("jdbc.connection.icl");
    mDbConnCrs2Ic = new DBConnection();
    mDbConnCrs2Ic.Init("jdbc.connection.crs2ic");
    mDbConnProtCrsPar = new DBConnection();
    mDbConnProtCrsPar.Init("jdbc.connection.icl");
    mDbConnLoadIc = new DBConnection();
    mDbConnLoadIc.Init("jdbc.connection.icl");
    mDbConnSt2Ic = new DBConnection();
    mDbConnSt2Ic.Init("jdbc.connection.ic");
    public void Run() throws Exception
    String protState = new String("OK");
    mProt = new Protocol(mDbConnProtCrs2Ic, "CRS2IC");
    try
    mProt.ChkRecentCrs2IcErrors();
    CtlParameter ctlPar = new CtlParameter(mDbConnProtCrs2Ic);
    String buStageDirectory = ctlPar.getBuStageDirectory();
    String paStageDirectory = ctlPar.getPaStageDirectory();
    String reStageDirectory = ctlPar.getReStageDirectory();
    mXmlWorkDirectory = ctlPar.getCrs2IcXmlWorkDir();
    mXmlArchDirectory = ctlPar.getCrs2IcXmlArchDir();
    mParagraphPropertyFile = ctlPar.getParagraphPropertyFile();
    workBuDir(buStageDirectory);
    workPaDir(paStageDirectory);
    workReDir(reStageDirectory);
    workXmlDir();
    startEntityTransfer(protState);
    if(protState.equals("ERR") )
    mProt.Write("skipping §-Transfer, because of error in buyer-transfer");
    else
    startSt2Ic(protState);
    mProt.Write("successfully completed");
    catch(Exception e)
    protState = "ERR"; < ====== this is the place it fails
    mProt.Write("Error crs2ic.Run");
    mProt.Write(e.toString()+": "+e.getMessage());
    for(int i=0; i<e.getStackTrace().length;i++)
    mProt.Write(e.getStackTrace().toString());
    mProt.Close(protState);
    mDbConnSt2Ic.Commit();
    mDbConnSt2Ic.Close();
    mDbConnLoadIc.Commit();
    mDbConnLoadIc.Close();
    mDbConnProtCrsPar.Commit();
    mDbConnProtCrsPar.Close();
    mDbConnCrs2Ic.Commit();
    mDbConnCrs2Ic.Close();
    mDbConnProtCrs2Ic.Commit();
    mDbConnProtCrs2Ic.Close();
    snipped
    public static void main(String[] args)
    * arguments:
    * [-bu] -- Buyer-Ascii
    * [-pa] -- Paragraph-Ascii
    * [-re] -- Reference
    * [-bux] -- Buyer-XML
    * [-pax] -- Paragraph-XML
    * [-ent] -- Entity-Transfer
    * [-pat] -- Paragraph-Transfer
    try
    crs2ic crs2ic = new crs2ic();
    if(args.length == 0)
    // do all steps
    crs2ic.mDoBu = true;
    crs2ic.mDoPa = true;
    crs2ic.mDoRe = true;
    crs2ic.mDoBux = true;
    crs2ic.mDoPax = true;
    crs2ic.mDoEnt = true;
    crs2ic.mDoPat = true;
    else
    for(int i = 0; i < args.length; i++)
    if("-bu".equals(args[i]))
    crs2ic.mDoBu = true;
    else if("-pa".equals(args[i]))
    crs2ic.mDoPa = true;
    else if("-re".equals(args[i]))
    crs2ic.mDoRe = true;
    else if("-bux".equals(args[i]))
    crs2ic.mDoBux = true;
    else if("-pax".equals(args[i]))
    crs2ic.mDoPax = true;
    else if("-ent".equals(args[i]))
    crs2ic.mDoEnt = true;
    else if("-pat".equals(args[i]))
    crs2ic.mDoPat = true;
    else
    System.out.println(" arguments:");
    System.out.println(" [-bu] -- Buyer-Ascii");
    System.out.println(" [-pa] -- Paragraph-Ascii");
    System.out.println(" [-re] -- Reference");
    System.out.println(" [-bux] -- Buyer-XML");
    System.out.println(" [-pax] -- Paragraph-XML");
    System.out.println(" [-ent] -- Entity-Transfer");
    System.out.println(" [-pat] -- Paragraph-Transfer");
    throw new Exception("unknown argument ()");
    crs2ic.Run();
    catch(Exception e)
    e.printStackTrace();
    System.exit(1);

  • Firefox causing problems with web pages and Yahoo

    Firefox has been causing problems with:
    Yahoo: no matter how many times I reset the font size, it is always much bigger. Also the "From" box (where my name and email address appear) has shrunk;
    This does not happen in Chrome
    A particular website has suddenly stopped working: http://explore.org/#!/live-cams/player/kitten-rescue-cam
    Instead of seeing what is going on on the live cam, all I get is a green screen.
    This does not happen in Chrome.
    I have followed all the instructions:
    - Reset Firefox
    - Disabled and re-enabled add-ons
    And yet this has solved nothing. Iam now having to run both Firefox and Chrome at the same time. This is highly frustrating. I like Firefox better than Chrome but problems are mounting up and I do need help.
    Has any one got some idea what is going on?
    Many thanks...
    Anna

    Hi
    Thank you for your input. I did try Font size, reset, zoom... the lot and nopes it did nothing. As I said the problem is in Firefox, not in Chrome.
    I also checked the plug-ins issue and it seems they are in order and up to date.
    Now this morning, the website has been working again in Firefox (was working ok in Chrome).
    Overall Firefox's performance with some websites is poor. My health report confirms the number of times it crushes (many times a day, which is highly frustrating). I am keen to keep Firefox as it is so mcuh nicer in many ways than Chrome but it's performance is an issue for me... sigh...

Maybe you are looking for

  • Display parameter values in separate sheet in Crystal Reports 2008

    Dear all, I am using CR 2008 SP6 and I want to provide/display the values of the parameters which the user has entered before executing the Crystal report. Is there any way to display this values, maybe on a separate sheet or area within the report?

  • Pulse dialling only !! Help please

    Hello, I am about at the end of my tether.....I have moved into a new build property and have a BT home hub.  For some reason which is beyond my comprehension I am unable to dial out unless I set my phone to 'pulse' dialling instead of 'tone' This me

  • ITunes 7 - which media types will self sort into which of the 6 libraries?

    I have dozens of audio files that I created myself transfering analog tapes of lectures into MPEG files. They are spoken word lectures that are much better suited for the AUDIO BOOKS - Library rather than the MUSIC - Library I have selected "AudioBoo

  • Indesign Files Uploaded to the Cloud dont open in the web UI

    Hi, When I upload an indesign file to the cloud, the thumbnail shown is a default one & if I open the file (using the web UI) I cant view the content of the file. I tryed to view the uploaded files using Chrome, Firefox, Safari & IE both in OSX, Wind

  • Handling Session in jsp and bean scope

    i have problems with handling session in jsp I want to check on all jsp pages first thing is session is null i want to him to be redirected to first page and he should not be able to go ahead I tried if(session ==null) response.sendRedirect("Login.js