Mysql database "Invalid authorization specification:"

Hi,
we are using mysql database in our server. i ve created one database name and restored the data into that and i ve granted the all previliges for that user with one username and password. Now i ve written a java program to access that data base. and i am running that java program in server using one script. while i am running my java program in server. i am getting following exception message.
Database: jdbc:mysql://ip. . . /xxxtesst
user: xxxtest
password: xxxtest
<DbCall> doSomething Error 1: null
java.sql.SQLException: Invalid authorization specification: Access denied for user 'xxxtest'@'app1.dmz.mysite.com' (using password: YES)
java.sql.SQLException: Invalid authorization specification: Access denied for user 'xxxtest'@'app1.dmz.mysite.com' (using password: YES)
at org.gjt.mm.mysql.MysqlIO.init(Ljava.lang.String;Ljava.lang.String;)V(Unknown Source)
at org.gjt.mm.mysql.Connection.connectionInit(Ljava.lang.String;ILjava.util.Properties;Ljava.lang.String;Ljava.lang.String;Lorg.gjt.mm.mysql.Driver;)V(Unknown Source)
at org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Ljava.lang.String;ILjava.util.Properties;Ljava.lang.String;Ljava.lang.String;Lorg.gjt.mm.mysql.Driver;)V(Unknown Source)
at org.gjt.mm.mysql.Driver.connect(Ljava.lang.String;Ljava.util.Properties;)Ljava.sql.Connection;(Unknown Source)
at java.sql.DriverManager.getConnection(Ljava.lang.String;Ljava.util.Properties;Ljava.lang.ClassLoader;)Ljava.sql.Connection;(Unknown Source)
at java.sql.DriverManager.getConnection(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)Ljava.sql.Connection;(Unknown Source)
at escrow.LandamDbremove.findnewrecords()V(LandamDbremove.java:205)
at escrow.LandamDbremove.main([Ljava.lang.String;)V(LandamDbremove.java:761)
Exception in Main : java.sql.SQLException: Invalid authorization specification: Access denied for user 'xxxtest'@'app1.dmz.mysite.com' (using password: YES)
Note: i ve given currect username, password, database name in my program.

When setting up users it is possible to restrict access by ip. You may have full priviledges as 'slai@localhost" but not as '[email protected]' . Check the user tables and see.

Similar Messages

  • Invalid authorization specification,  message from server

    I am new to JDBC, and Java. I'm trying to connect MYSQL database with the following code, i compiled and execute jdbcExample (using JCreator). It giving me this error:
    Exception: Invalid authorization specification, message from server: "Access denied for user: '[email protected]' (Using password: YES)". I have full access granted to the mydb database. Please advise. Thanks!!
    package BeanDir;
    import java.sql.*;
    public class jdbcExample {
    public static void main(String args[]) {
    Connection con = null;
    try {
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    con = DriverManager.getConnection("jdbc:mysql://myintranet/mydb?user=slai&password=mypasswd");
    if(!con.isClosed())
    System.out.println("Successfully connected to MySQL server...");
    } catch(Exception e) {
    System.err.println("Exception: " + e.getMessage());
    } finally {
    try {
    if(con != null)
    con.close();
    } catch(SQLException e) {}

    When setting up users it is possible to restrict access by ip. You may have full priviledges as 'slai@localhost" but not as '[email protected]' . Check the user tables and see.

  • InfoPath form failed to use NTLM authentication to load data - Invalid authorization specification

    I knew this might be discussed in other places but I've searched over the web but still do not have a clue how to fix my issue.
    I am using SharePoint 2010 and I created an InfoPath form that reads data from a database using data connection file (udcx). As explained in many other articles, I've set up my secure store correctly and created an application called 'InvestmentOperationAccess'
    with a windows service account and then export the udcx file and enabled the <udc:Authentication> tag  as flowing:
    <udc:Authentication><udc:SSO AppId='InvestmentOperationAccess' CredentialType='NTLM' /></udc:Authentication>
    Then I upload this file back to the data connection library and approved. But when I try to load the form in web broswer, I received the following error:
    05/15/2013 14:40:15.09 w3wp.exe (0x0C94) 0x263C InfoPath Forms Services Runtime - Data Connections eq8l Warning The following query failed: EntityMatrixView (User:
    xxxxx\xxx, Form Name: Template, IP: , Connection Target: , Request:xxxxxxxxx(URL of the list) Form ID: urn:schemas-microsoft-com:office:infopath:list:-AutoGen-2013-05-14T23:32:41:604Z
    Type: DataAdapterException, Exception Message: The form cannot connect to the data source. Invalid authorization specification
    In the meantime, I used SQL profile try to capture the credential it is used by nothing was passed to that SQL box.
    Then I created another application in my secure store with SQL login account and modify my udcx file to be 
    <udc:Authentication><udc:SSO AppId='InvestmentOperationSQLAccess' CredentialType='SQL' /></udc:Authentication>
    This time when I load the form, everything worked and in SQL profile I can see it is reading data using the SQL account I specified in secure store.
    In a nutshell, it is working with SQL authentication type but not NTLM, anyone could help me with that?

    Same problem here. Anyone has a solution for that?
    It seems one cannot use windows accounts with secure store and database access for info path data sources ...

  • Invalid Authorization Specification

    When I go to the homepage of my companies website I am
    receiving an entire error report as is anyone else that goes to the
    site. The [problem is such that I cant even get to the backend
    control panel because the authorization of my database is all
    messed up.
    The error I receive is : Invalid Authorization Specification:
    Access denied for user:
    &amp;apos;[email protected]&amp;apos; (Using
    Password: Yes)
    The web address is www.nehra.com
    Any ideas about what I should do from here I have already
    rebooted the server and gone that direction and nothing
    changed...

    Can you use some kind of database tool to connect to the
    database in
    question to make sure it is up and running and behaving
    properly. And
    that you can log on with these credentials?
    Mrtechguy wrote:
    > When I go to the homepage of my companies website I am
    receiving an entire
    > error report as is anyone else that goes to the site.
    The [problem is such
    > that I cant even get to the backend control panel
    because the authorization of
    > my database is all messed up.
    >
    > The error I receive is : Invalid Authorization
    Specification: Access denied
    > for user:
    &amp;apos;[email protected]&amp;apos; (Using
    Password: Yes)
    >
    > The web address is www.nehra.com
    >
    > Any ideas about what I should do from here I have
    already rebooted the server
    > and gone that direction and nothing changed...
    >

  • Problem accessing mysql database

    Hello all
    I am using the following piece of code to access a database running remotely..I am using mysql-connector-java-3.1.0.
    Connection C = DriverManager.getConnection(
    "jdbc:mysql://***.***.***.***:3306/db1?user=\'******\'&password=\'*****\'");
    In the above ***.***.***.*** is the ip address of the machine on which the database is there.
    The error message is:
    Invalid authorization specification: Access denied for user.
    Please help me out on this. This is my first attempt to connect to MySQL from Java. Any code or comments and suggestions will be great.
    thanks a bunch
    Mahesh :)

    hi
    thanks a lot for ur reply...I had enuf rights to connect to the database....i recollected later that the right way to get the Connection object is like this:
    Connection C = DriverManager.getConnection("jdbc:mysql://***.***.***.***:3306/db1?user=******&password=*****");
    The name-value pairs like name and password need not have inverted commas...just user=soandso@password=soandso...
    thanks a lot nyways...
    Mahesh :)

  • Invalid authorization

    hi,
    i have a problem.After i updated my JSC then i tried to deploy my project and i got a error.
    "javax.faces.FacesException: Can't instantiate class: 'onlinebooks.Page1'.. class onlinebooks.Page1 : javax.faces.FacesException: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: Invalid authorization specification message from server: "Access denied for user 'root'@'localhost' (using password: YES)"
    anyone know what is this????

    Hi,
    Could you please create a new user in MySQL and use that to connect. The only situation in which I got the above mentioned error message was when the password provided was wrong. So one way to check if anything else is giving problem is to create a new user with a password and see if it works.
    Cheers
    Giri

  • Dg4odbc to connect to mysql rc 28500 something other than invalid authoriza

    dg4odbc to connect to mysql rc 28500 something other than invalid authoriza
    Hi,
    We are trying to establish connectivity from oracle to mysql using dg4odbc and openlink ODBC drivers. I get the following error when queries are run on mysql tables from within
    oracle/db links.
    SQL> select * from "labels"@"dg4odbc.cisco.com"
    2 ;
    select * from "labels"@"dg4odbc.cisco.com"
    ERROR at line 1:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    ORA-02063: preceding line from DG4ODBC
    contents of dg4odbc agent log is as below.
    $ cat dg4odbc_agt_3168.trc
    Oracle Corporation --- TUESDAY SEP 30 2008 05:37:56.658
    Heterogeneous Agent Release
    11.1.0.6.0
    Oracle Corporation --- TUESDAY SEP 30 2008 05:37:56.655
    Version 11.1.0.6.0
    Entered hgogprd
    HOSGIP for "HS_FDS_TRACE_LEVEL" returned "DEBUG"
    Entered hgosdip
    setting HS_OPEN_CURSORS to default of 50
    setting HS_FDS_RECOVERY_ACCOUNT to default of "RECOVER"
    setting HS_FDS_RECOVERY_PWD to default value
    setting HS_FDS_TRANSACTION_LOG to default of "HS_TRANSACTION_LOG"
    setting HS_FDS_TRANSACTION_ISOLATION to default of "READ_COMMITTED"
    setting HS_NLS_NCHAR to default of "AL32UTF8"
    setting HS_FDS_TIMESTAMP_AS_DATE to default of "TRUE"
    setting HS_RPC_FETCH_REBLOCKING to default of "ON"
    setting HS_FDS_FETCH_ROWS to default of "100"
    setting HS_FDS_RESULTSET_SUPPORT to default of "FALSE"
    setting HS_FDS_PROC_IS_FUNC to default of "FALSE"
    setting HS_FDS_CHARACTER_SEMANTICS to default of "FALSE"
    setting HS_FDS_MAP_NCHAR to default of "TRUE"
    setting HS_NLS_DATE_FORMAT to default of "YYYY-MM-DD HH24:MI:SS"
    setting HS_FDS_REPORT_REAL_AS_DOUBLE to default of "FALSE"
    setting HS_LONG_PIECE_TRANSFER_SIZE to default of "65536"
    setting HS_SQL_HANDLE_STMT_REUSE to default of "FALSE"
    setting HS_FDS_QUERY_DRIVER to default of "TRUE"
    HOSGIP returned value of "FALSE" for HS_FDS_SUPPORT_STATISTICS
    setting HS_CALL_NAME_ISP to "gtw$:SQLTables;gtw$:SQLColumns;gtw$:SQLPrimaryKeys;gtw$:SQLForeignKeys;gtw$:SQLProcedures;gtw$:SQLStatistics"
    Exiting hgosdip, rc=0
    ORACLE_SID is "dg4odbc"
    Product-Info:
    Port Rls/Upd:6/0 PrdStat:0
    Agent:Oracle Database Gateway for ODBC
    Facility:hsa
    Class:ODBC, ClassVsn:11.1.0.6.0_0006, Instance:dg4odbc
    Exiting hgogprd, rc=0
    Entered hgoinit
    HOCXU_COMP_CSET=1
    HOCXU_DRV_CSET=873
    HOCXU_DRV_NCHAR=873
    HOCXU_DB_CSET=873
    HOCXU_SEM_VER=90200
    Entered hgolofn at 2008/09/30-05:37:57
    HOSGIP for "HS_FDS_SHAREABLE_NAME" returned "/export/home/oratest/openlink/lib/libiodbc.so"
    Entered hgolofns at 2008/09/30-05:37:57
    HOSGIP for "HS_OPEN_CURSORS" returned "50"
    HOSGIP for "HS_FDS_FETCH_ROWS" returned "100"
    HOSGIP for "HS_LONG_PIECE_TRANSFER_SIZE" returned "65536"
    HOSGIP for "HS_NLS_NUMERIC_CHARACTER" returned ".,"
    Exiting hgoinit, rc=0 at 2008/09/30-05:37:57
    Entered hgolgon at 2008/09/30-05:37:57
    reco:0, name:odbc_26530, tflag:0
    Entered hgosuec at 2008/09/30-05:37:57
    Exiting hgosuec, rc=0 at 2008/09/30-05:37:57
    HOSGIP for "HS_FDS_RECOVERY_ACCOUNT" returned "RECOVER"
    HOSGIP for "HS_FDS_TRANSACTION_LOG" returned ""HS_TRANSACTION_LOG""
    HOSGIP for "HS_FDS_TIMESTAMP_AS_DATE" returned "TRUE"
    HOSGIP for "HS_FDS_CHARACTER_SEMANTICS" returned "FALSE"
    HOSGIP for "HS_FDS_MAP_NCHAR" returned "TRUE"
    HOSGIP for "HS_FDS_RESULT_SET_SUPPORT" returned "FALSE"
    HOSGIP for "HS_FDS_PROC_IS_FUNC" returned "FALSE"
    HOSGIP for "HS_FDS_REPORT_REAL_AS_DOUBLE" returned "FALSE"
    using odbc_26530 as default value for "HS_FDS_DEFAULT_OWNER"
    HOSGIP for "HS_SQL_HANDLE_STMT_REUSE" returned "FALSE"
    Entered hgocont at 2008/09/30-05:37:57
    HS_FDS_CONNECT_INFO = "dg4odbc"
    HS_FDS_CONNECT_STRING = "OptimizePrepare=2"
    Entered hgogenconstr at 2008/09/30-05:37:57
    dsn:dg4odbc, name:odbc_26530
    optn:OptimizePrepare=2
    ##>Connect Parameters (len=57)<##
    ## DSN=dg4odbc;
    #! UID=odbc_26530;
    #! PWD=*
    ## OptimizePrepare=2;
    Exiting hgogenconstr, rc=0 at 2008/09/30-05:37:57
    Entered hgopoer at 2008/09/30-05:37:57
    Exiting hgopoer, rc=0 at 2008/09/30-05:37:57 with error ptr FILE:hgopoer.c LINE:128 ID:GetDiagRec error
    hgocont, line 1904: calling SqlDriverConnect got sqlstate
    Exiting hgocont, rc=28500 at 2008/09/30-05:37:57 with error ptr FILE:hgocont.c LINE:1923 ID:Something other than invalid authorization
    Exiting hgolgon, rc=28500 at 2008/09/30-05:37:57 with error ptr FILE:hgolgon.c LINE:612 ID:Calling hgocont
    Entered hgoexit at 2008/09/30-05:37:57
    $
    Here is my setup
    Source : oracle 9208 on solaris + Patch_p5965763_9208_solaris64
    dg4odbc component on a different home
    9i and 11g listeners.
    Target : Mysql 5.x on linux sever
    ODBC Driver manager and driver : Openlink single tier driver for mysql.
    he last lines of dg4odbc agent states an error "something other then invalid authorization"(see below)..
    Entered hgopoer at 2008/09/30-05:37:57
    Exiting hgopoer, rc=0 at 2008/09/30-05:37:57 with error ptr FILE:hgopoer.c LINE:128 ID:GetDiagRec error
    hgocont, line 1904: calling SqlDriverConnect got sqlstate
    Exiting hgocont, rc=28500 at 2008/09/30-05:37:57 with error ptr FILE:hgocont.c LINE:1923 ID:Something other than invalid authorization
    Exiting hgolgon, rc=28500 at 2008/09/30-05:37:57 with error ptr FILE:hgolgon.c LINE:612 ID:Calling hgocont
    Entered hgoexit at 2008/09/30-05:37:57
    Has anyone encountered similar issue while configuring dg4odbc....I never had trouble with hsodbc. Since hsodbc is desupported , We are evaluating dg4odbc and openlink odbc
    drivers to establish connectivity to mysql and stuck at this point.
    Any suggestion from gateway gurus ?
    Thanks in advance,
    Bhaskar

    Content of Important config files is as below.
    Source : oracle 9208 on solaris + Patch_p5965763_9208_solaris64
    dg4odbc component on a different home
    9i and 11g listeners.
    Target : Mysql 5.x on linux sever
    ODBC Driver manager and driver : Openlink single tier driver for mysql.
    contents of key config files are as below.
    contents of 9i tnsnames.ora
    # To Test DG4ODBC Config
    dg4odbc =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS =
    (PROTOCOL = TCP)
    (HOST = ora-dev2)
    (PORT = 1556)
    (CONNECT_DATA =
    (SID= dg4odbc)
    (HS=OK)
    contents of 11g listener file
    $ cat listener.ora
    # listener.ora Network Configuration File: /u03/orapoc/oracle/product/dg4odbc/network/admin/listener.ora
    # Generated by Oracle configuration tools.
    TRACE_LEVEL_LISTENER_DG = USER
    LISTENER_DG =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ora-dev2)(PORT = 1556))
    LOG_FILE_LISTENER_DG = LISTENER_DG.log
    TRACE_DIRECTORY_LISTENER_DG = /u03/orapoc/oracle/product/dg4odbc/network/trace
    SID_LIST_LISTENER_DG =
    (SID_LIST =
    (SID_DESC =
    (ORACLE_HOME = /u03/orapoc/oracle/product/dg4odbc)
    (SID_NAME = dg4odbc)
    (ENVS = "LD_LIBRARY_PATH=/export/home/oratest/openlink/lib:/u03/orapoc/oracle/product/dg4odbc/lib")
    (PROGRAM = dg4odbc)
    LOG_DIRECTORY_LISTENER_DG = /u03/orapoc/oracle/product/dg4odbc/network/log
    TRACE_FILE_LISTENER_DG = LISTENER_DG.trc
    contents of initdg4odbc.ora
    $ pwd
    /u03/orapoc/oracle/product/dg4odbc/hs/admin
    $ ls
    initdg4odbc.ora initdg4odbc.ora.orig listener.ora.sample tnsnames.ora.sample
    $ cat initdg4odbc.ora
    # This is a sample agent init file that contains the HS parameters that are
    # needed for an ODBC Agent.
    # HS init parameters
    HS_FDS_CONNECT_INFO=dg4odbc
    HS_FDS_TRACE_LEVEL = DEBUG
    HS_FDS_TRACE_FILE_NAME = dg_mysql.log
    HS_FDS_CONNECT_STRING = "OptimizePrepare=2"
    HS_FDS_SHAREABLE_NAME=/export/home/oratest/openlink/lib/libiodbc.so
    HS_FDS_SUPPORT_STATISTICS=FALSE
    # ODBC specific environment variables
    set ODBCINI=/export/home/oratest/openlink/bin/odbc.ini
    set ODBCINSTINI=/export/home/oratest/openlink/bin/odbcinst.ini
    set OPENLINKINI=/export/home/oratest/openlink/bin/openlink.ini
    set OPL_LICENSE_DIR=/export/home/oratest/openlink/bin/
    # Environment variables required for the non-Oracle system
    #set <envvar>=<value>
    set LD_LIBRARY_PATH=/export/home/oratest/openlink/lib:/u03/orapoc/oracle/product/dg4odbc/lib
    contents of odbc.ini
    $ cat /export/home/oratest/openlink/bin/odbc.ini
    ; odbc.ini
    ; ODBC DSN configuration file
    ; This file is an OpenLink Software product configuration file.
    ; To learn more about this product, or any other product in our
    ; portfolio, please check out our web site at:
    ; http://www.openlinksw.com
    ; or contact us at:
    ; [email protected]
    ; If you have any technical questions, please contact our support
    ; staff at:
    ; [email protected]
    [ODBC Data Sources]
    mys5_lite = OpenLink MySQL 5.x Lite Driver (multi threaded)
    mys5_lite_unicode = OpenLink MySQL 5.x Lite Driver (Unicode)(multi threaded)
    dg4odbc = OpenLink MySQL 5.x Lite Driver (multi threaded)
    [mys5_lite]
    Driver = /export/home/oratest/openlink/lib/mys5_mt_lt.so
    ServerType = MySQL 5.x
    Username =
    Password =
    Database =
    Options =
    FetchBufferSize = 99
    ReadOnly =
    DeferLongFetch =
    JetFix = No
    Description = Sample MySQL 5.x Lite Connection
    MaxRows =
    NoRowSetSizeLimit = No
    InitialSQL =
    NoAutoCommit = No
    NoLoginBox =
    SqlDbmsName =
    [mys5_lite_unicode]
    Driver = /export/home/oratest/openlink/lib/mys5_mt_lu.so
    ServerType = MySQL 5.x
    Username =
    Password =
    Database =
    Options =
    FetchBufferSize = 99
    ReadOnly = no
    DeferLongFetch = no
    JetFix = no
    Description = Sample MySQL 5.x Lite Connection
    [dg4odbc]
    DeferLongFetch =
    MaxRows = 1000000
    JetFix = No
    NoRowSetSizeLimit = No
    Description = Openlink Unix Lite DSN
    Options = -H odbctest.power.com -P 3329
    UserName = odbc_test
    Password = abcdef
    ServerType = MySQL 5.x
    InitialSQL =
    Driver = /export/home/oratest/openlink/lib/mys5_mt_lt.so
    Database = linksys__dev
    ReadOnly =
    NoAutoCommit = No
    NoLoginBox =
    FetchBufferSize = 99
    SqlDbmsName =
    [ODBC]
    DebugFile = /export/home/oratest/openlink/mysql_debug
    TraceFile = /export/home/oratest/openlink/openlink_mysql
    Trace = 1

  • Update Specific Rows In MySQL Database?

    greetings all
    i have MySQL database named library contains a table named books with the attributes:name,amount,price,cat_id
    and i want to update all the names,amount,prices for specific cat_id
    so i used the following query:
    PreparedStatement ps = connection.prepareStatement("UPDATE books SET name = ?,amount = ?,price = ? Where cat_id = "+1);
    and get the question marked values from the JTable named table_science
                    for(int i = 0 ; i< dtm_science.getRowCount(); i++){                                         ps.setString(1,(String)table_science.getValueAt(i,2));                                  ps.setInt(2,(Integer)table_science.getValueAt(i,1));                 ps.setInt(3,(Integer)table_science.getValueAt(i,0));                                 ps.executeUpdate();                                                                                                                        }                         ps.close();             connection.close();
    the code doesn't work properly
    it takes the values in the last row in the jtable and set them for all attributes with cat_id=1
    meaning if you have 3 rows in the jtable named table_science which have cat_id=1 and the columns:
    name,amount,price
    abc,5,300
    efg,6,400
    mno,6,900
    and when i exceute the update query all the fields in the database which have cat_id=1 would be set to mno,6,900
    meaning that the table_science would be:
    mno,6,900
    mno,6,900
    mno,6,900
    is there's an error in the code?
    or what's the problem?
    thanks in advance

    the database name:test
    table name:books
    attributes:name,amount,price,cat_id
    description:several names may have the same cat_id
    goal:when the user presses update button
    all names,amounts,prices with cat_id=1 in the database is updated with the JTable values name,amount,price
    problem:when changing values in the JTable and trying to update all names,amounts,prices with cat_id=1 is set to the last row values in the jtable?
    here's the whole code:
    import javax.swing.*;
    import javax.swing.table.*;
    import java.awt.Dimension;
    import java.awt.*;
    import javax.swing.JFrame;
    import java.awt.event.*;
    import javax.swing.JTable;
    import java.sql.*;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSetMetaData;
    import java.sql.ResultSet;
    import java.sql.Statement;
    class table_update extends JPanel {
        static DefaultTableModel dtm1;
        static JTable table1;
        static JFrame frame;
        public table_update() {
            super(new GridLayout(1, 1));
            dtm1 = new DefaultTableModel();
            dtm1.addColumn("ID");
            dtm1.addColumn("Name");
            dtm1.addColumn("Amount");
            dtm1.addColumn("Price");
            table1 = new JTable(dtm1) {
                public Class getColumnClass(int column) {
                    return getValueAt(0, column).getClass();
            JScrollPane scrollPane1 = new JScrollPane(table1);
            JButton Update = new JButton("Update");
            table1.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
            table1.setPreferredScrollableViewportSize(new Dimension(410, 160));
            JPanel panel1 = new JPanel(new FlowLayout());
            panel1.add(scrollPane1);
            panel1.add(Update);
            Update.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent event20) {
                    update_db();
                    frame.dispose();
                    createAndShowGUI();
            //reading from databse
            try {
                Class.forName("com.mysql.jdbc.Driver");
                Connection c1 = DriverManager.getConnection("jdbc:mysql://localhost/test", "root", "");
                Statement s1 = c1.createStatement();
                ResultSet rs1 = s1.executeQuery("SELECT name,amount,price from books where cat_id=1");
                int id1 = 0;
                while (rs1.next()) {
                    id1++;
                    Object[] obj = {id1, rs1.getString("name"), rs1.getInt("amount"), rs1.getInt("price")};
                    dtm1.addRow(obj);
                c1.close();
            } catch (Exception e) {
                e.printStackTrace();
            table1.setModel(dtm1);
            setLayout(new BorderLayout());
            add(panel1, BorderLayout.CENTER);
        public static void createAndShowGUI() {
            frame = new JFrame("Update DB");
            frame.setSize(500, 300);
            frame.setLocationRelativeTo(null);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.add(new table_update());
            frame.setResizable(false);
            frame.setVisible(true);
            JTable table1 = new JTable();
            table1.setModel(new DefaultTableModel(new Object[][][][]{}, new String[]{"id", "name", "amount", "price"}) {
                Class[] types = new Class[]{
                    java.lang.Integer.class, java.lang.String.class, java.lang.Integer.class, java.lang.Integer.class
                public Class getColumnClass(int columnIndex) {
                    return types[columnIndex];
        public static void update_db() {
            Connection c = null;
            PreparedStatement ps = null;
            try {
                Class.forName("com.mysql.jdbc.Driver");
                String url = "jdbc:mysql://localhost:3306/test?requireSSL=false&useUnicode=true&characterEncoding=utf8";
                c = DriverManager.getConnection(url, "root", "");
                ps = c.prepareStatement("UPDATE books SET name = ?,amount = ?,price = ? WHERE cat_id = 1 ");
                for (int i = 0; i < dtm1.getRowCount(); i++) {
                    ps.setString(1, (String) table1.getValueAt(i, 1));
                    ps.setInt(2, (Integer) table1.getValueAt(i, 2));
                    ps.setInt(3, (Integer) table1.getValueAt(i, 3));
                    ps.executeUpdate();
                ps.close();
                c.close();
            } catch (Exception ex) {
                ex.printStackTrace();
        public static void main(String[] args) {
            createAndShowGUI();
    }

  • Issue trying to connect oracle to mysql database

    Hi there,
    I need some help with the configuration, i'm trying to connect a windows oracle 11g r2 to a linux mysql 5.5, but i'm having a lot of issue, here i will put the configuration.
    Thanks for everyone how will try to help me!
    here is my tnsname.ora:
    # tnsnames.ora Network Configuration File: C:\app\Administrador\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    ORACLR_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    (CONNECT_DATA =
    (SID = CLRExtProc)
    (PRESENTATION = RO)
    ORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = gabriel-103eff2)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl)
    ms_connection =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=gabriel-103eff2)(PORT=1521))
    (CONNECT_DATA=(SID=ms))
    (HS=OK)
    here is my listener.ora:
    # listener.ora Network Configuration File: C:\app\Administrador\product\11.2.0\dbhome_1\network\admin\listener.ora
    # Generated by Oracle configuration tools.
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = CLRExtProc)
    (ORACLE_HOME = C:\app\Administrador\product\11.2.0\dbhome_1)
    (PROGRAM = extproc)
    (ENVS = "EXTPROC_DLLS=ONLY:C:\app\Administrador\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    (SID_DESC=
    (SID_NAME=ms)
    (ORACLE_HOME=C:\app\Administrador\product\11.2.0\dbhome_1)
    (PROGRAM=dg4odbc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = gabriel-103eff2)(PORT = 1521))
    ADR_BASE_LISTENER = C:\app\Administrador
    here is the init*.ora:
    # This is a sample agent init file that contains the HS parameters that are
    # needed for the Database Gateway for ODBC
    # HS init parameters
    HS_FDS_CONNECT_INFO = ms
    HS_FDS_TRACE_LEVEL = debug
    # Environment variables required for the non-Oracle system
    #set <envvar>=<value>
    here is the debug:
    Oracle Corporation --- SEXTA-FEIRA JAN 04 2013 17:18:13.390
    Heterogeneous Agent Release
    11.2.0.1.0
    Oracle Corporation --- SEXTA-FEIRA JAN 04 2013 17:18:13.390
    Version 11.2.0.1.0
    Entered hgogprd
    HOSGIP for "HS_FDS_TRACE_LEVEL" returned "debug"
    Entered hgosdip
    setting HS_OPEN_CURSORS to default of 50
    setting HS_FDS_RECOVERY_ACCOUNT to default of "RECOVER"
    setting HS_FDS_RECOVERY_PWD to default value
    setting HS_FDS_TRANSACTION_LOG to default of HS_TRANSACTION_LOG
    setting HS_IDLE_TIMEOUT to default of 0
    setting HS_FDS_TRANSACTION_ISOLATION to default of "READ_COMMITTED"
    setting HS_NLS_NCHAR to default of "UCS2"
    setting HS_FDS_TIMESTAMP_MAPPING to default of "DATE"
    setting HS_FDS_DATE_MAPPING to default of "DATE"
    setting HS_RPC_FETCH_REBLOCKING to default of "ON"
    setting HS_FDS_FETCH_ROWS to default of "100"
    setting HS_FDS_RESULTSET_SUPPORT to default of "FALSE"
    setting HS_FDS_RSET_RETURN_ROWCOUNT to default of "FALSE"
    setting HS_FDS_PROC_IS_FUNC to default of "FALSE"
    setting HS_FDS_CHARACTER_SEMANTICS to default of "FALSE"
    setting HS_FDS_MAP_NCHAR to default of "TRUE"
    setting HS_NLS_DATE_FORMAT to default of "YYYY-MM-DD HH24:MI:SS"
    setting HS_FDS_REPORT_REAL_AS_DOUBLE to default of "FALSE"
    setting HS_LONG_PIECE_TRANSFER_SIZE to default of "65536"
    setting HS_SQL_HANDLE_STMT_REUSE to default of "FALSE"
    setting HS_FDS_QUERY_DRIVER to default of "TRUE"
    setting HS_FDS_SUPPORT_STATISTICS to default of "FALSE"
    Parameter HS_FDS_QUOTE_IDENTIFIER is not set
    setting HS_KEEP_REMOTE_COLUMN_SIZE to default of "OFF"
    setting HS_FDS_GRAPHIC_TO_MBCS to default of "FALSE"
    setting HS_FDS_MBCS_TO_GRAPHIC to default of "FALSE"
    Default value of 32 assumed for HS_FDS_SQLLEN_INTERPRETATION
    setting HS_CALL_NAME_ISP to "gtw$:SQLTables;gtw$:SQLColumns;gtw$:SQLPrimaryKeys;gtw$:SQLForeignKeys;gtw$:SQLProcedures;gtw$:SQLStatistics;gtw$:SQLGetInfo"
    setting HS_FDS_DELAYED_OPEN to default of "TRUE"
    setting HS_FDS_WORKAROUNDS to default of "0"
    Exiting hgosdip, rc=0
    ORACLE_SID is "ms"
    Product-Info:
    Port Rls/Upd:1/0 PrdStat:0
    Agent:Oracle Database Gateway for ODBC
    Facility:hsa
    Class:ODBC, ClassVsn:11.2.0.1.0_0008, Instance:ms
    Exiting hgogprd, rc=0
    Entered hgoinit
    HOCXU_COMP_CSET=1
    HOCXU_DRV_CSET=178
    HOCXU_DRV_NCHAR=1000
    HOCXU_DB_CSET=873
    HOCXU_SEM_VER=112000
    Entered hgolofn at 2013/01/04-17:18:14
    Exiting hgolofn, rc=0 at 2013/01/04-17:18:14
    HOSGIP for "HS_OPEN_CURSORS" returned "50"
    HOSGIP for "HS_FDS_FETCH_ROWS" returned "100"
    HOSGIP for "HS_LONG_PIECE_TRANSFER_SIZE" returned "65536"
    HOSGIP for "HS_NLS_NUMERIC_CHARACTER" returned ".,"
    HOSGIP for "HS_KEEP_REMOTE_COLUMN_SIZE" returned "OFF"
    HOSGIP for "HS_FDS_DELAYED_OPEN" returned "TRUE"
    HOSGIP for "HS_FDS_WORKAROUNDS" returned "0"
    HOSGIP for "HS_FDS_MBCS_TO_GRAPHIC" returned "FALSE"
    HOSGIP for "HS_FDS_GRAPHIC_TO_MBCS" returned "FALSE"
    Invalid value of 32 given for HS_FDS_SQLLEN_INTERPRETATION
    treat_SQLLEN_as_compiled = 1
    Exiting hgoinit, rc=0 at 2013/01/04-17:18:14
    Entered hgolgon at 2013/01/04-17:18:14
    reco:0, name:SYSTEM, tflag:0
    Entered hgosuec at 2013/01/04-17:18:14
    Exiting hgosuec, rc=0 at 2013/01/04-17:18:14
    HOSGIP for "HS_FDS_RECOVERY_ACCOUNT" returned "RECOVER"
    HOSGIP for "HS_FDS_TRANSACTION_LOG" returned "HS_TRANSACTION_LOG"
    HOSGIP for "HS_FDS_TIMESTAMP_MAPPING" returned "DATE"
    HOSGIP for "HS_FDS_DATE_MAPPING" returned "DATE"
    HOSGIP for "HS_FDS_CHARACTER_SEMANTICS" returned "FALSE"
    HOSGIP for "HS_FDS_MAP_NCHAR" returned "TRUE"
    HOSGIP for "HS_FDS_RESULTSET_SUPPORT" returned "FALSE"
    HOSGIP for "HS_FDS_RSET_RETURN_ROWCOUNT" returned "FALSE"
    HOSGIP for "HS_FDS_PROC_IS_FUNC" returned "FALSE"
    HOSGIP for "HS_FDS_REPORT_REAL_AS_DOUBLE" returned "FALSE"
    using SYSTEM as default value for "HS_FDS_DEFAULT_OWNER"
    HOSGIP for "HS_SQL_HANDLE_STMT_REUSE" returned "FALSE"
    Entered hgocont at 2013/01/04-17:18:14
    HS_FDS_CONNECT_INFO = "msodbc"
    RC=-1 from HOSGIP for "HS_FDS_CONNECT_STRING"
    Entered hgogenconstr at 2013/01/04-17:18:14
    dsn:msodbc, name:SYSTEM
    optn:
    Entered hgocip at 2013/01/04-17:18:14
    dsn:msodbc
    Exiting hgocip, rc=0 at 2013/01/04-17:18:14
    Exiting hgogenconstr, rc=0 at 2013/01/04-17:18:14
    Entered hgopoer at 2013/01/04-17:18:14
    hgopoer, line 233: got native error 0 and sqlstate IM002; message follows...
    [Microsoft][ODBC Driver Manager] Nome da fonte de dados não encontrado e nenhum driver padrão especificado {IM002}
    Exiting hgopoer, rc=0 at 2013/01/04-17:18:14
    hgocont, line 2753: calling SqlDriverConnect got sqlstate IM002
    Exiting hgocont, rc=28500 at 2013/01/04-17:18:15 with error ptr FILE:hgocont.c LINE:2773 ID:Something other than invalid authorization
    Exiting hgolgon, rc=28500 at 2013/01/04-17:18:15 with error ptr FILE:hgolgon.c LINE:781 ID:Calling hgocont
    Entered hgoexit at 2013/01/04-17:18:15
    Exiting hgoexit, rc=0
    when i use tnsping ms_connection
    C:\Documents and Settings\Administrador>tnsping ms_connection
    TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 07-JAN-2
    013 09:04:29
    Copyright (c) 1997, 2010, Oracle. All rights reserved.
    Arquivos de parÔmetros usados:
    Usado o adaptador TNSNAMES para resolver o apelido
    Tentativa de contatar (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=gabriel-103eff2
    )(PORT=1521)) (CONNECT_DATA=(SID=ms)) (HS=OK))
    OK (0 ms)
    Thank you so much!!!

    Hi Klaus,
    DG40DBC is installed in windows XP 32bit, tje DG4ODBC its installed in the oracle 11g EE r2, automatic right?
    The ODBC driver i had installed was mysql-connector-odbc-5.2.2-win32.exe
    Here is the registry key:
    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC]
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI]
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC File DSN]
    "DefaultDSNDir"="C:\\Arquivos de programas\\Arquivos comuns\\ODBC\\Data Sources"
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI]
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Conversor de página de código MS]
    "Translator"="C:\\WINDOWS\\system32\\MSCPXL32.dll"
    "Setup"="C:\\WINDOWS\\system32\\MSCPXL32.dll"
    "UsageCount"=dword:00000002
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Driver da Microsoft para arquivos texto (*.txt; *.csv)]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\odtext32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.,*.asc,*.csv,*.tab,*.txt,*.csv"
    "SQLLevel"="0"
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Driver do Microsoft Access (*.mdb)]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="2"
    "FileExtns"="*.mdb"
    "SQLLevel"="0"
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Driver do Microsoft dBase (*.dbf)]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\oddbse32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.dbf,*.ndx,*.mdx"
    "SQLLevel"="0"
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Driver do Microsoft Excel(*.xls)]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\odexl32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.xls"
    "SQLLevel"="0"
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Driver do Microsoft Paradox (*.db )]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\odpdx32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.db"
    "SQLLevel"="0"
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Driver para o Microsoft Visual FoxPro]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\vfpodbc.dll"
    "Setup"="C:\\WINDOWS\\system32\\vfpodbc.dll"
    "APILevel"="0"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.dbf,*.cdx,*.idx,*.fpt"
    "SQLLevel"="0"
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft Access Driver (*.mdb)]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="2"
    "FileExtns"="*.mdb"
    "SQLLevel"="0"
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft Access-Treiber (*.mdb)]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="2"
    "FileExtns"="*.mdb"
    "SQLLevel"="0"
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft dBase Driver (*.dbf)]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\oddbse32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.dbf,*.ndx,*.mdx"
    "SQLLevel"="0"
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft dBase VFP Driver (*.dbf)]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\vfpodbc.dll"
    "Setup"="C:\\WINDOWS\\system32\\vfpodbc.dll"
    "APILevel"="0"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.dbf,*.cdx,*.idx,*.fpt"
    "SQLLevel"="0"
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft dBase-Treiber (*.dbf)]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\oddbse32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.dbf,*.ndx,*.mdx"
    "SQLLevel"="0"
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft Excel Driver (*.xls)]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\odexl32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.xls"
    "SQLLevel"="0"
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft Excel-Treiber (*.xls)]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\odexl32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.xls"
    "SQLLevel"="0"
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft FoxPro VFP Driver (*.dbf)]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\vfpodbc.dll"
    "Setup"="C:\\WINDOWS\\system32\\vfpodbc.dll"
    "APILevel"="0"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.dbf,*.cdx,*.idx,*.fpt"
    "SQLLevel"="0"
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft ODBC for Oracle]
    "UsageCount"=dword:00000001
    "Driver"="C:\\WINDOWS\\system32\\msorcl32.dll"
    "Setup"="C:\\WINDOWS\\system32\\msorcl32.dll"
    "SQLLevel"="1"
    "FileUsage"="0"
    "DriverODBCVer"="02.50"
    "ConnectFunctions"="YYY"
    "APILevel"="1"
    "CpTimeout"="120"
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft Paradox Driver (*.db )]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\odpdx32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.db"
    "SQLLevel"="0"
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft Paradox-Treiber (*.db )]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\odpdx32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.db"
    "SQLLevel"="0"
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft Text Driver (*.txt; *.csv)]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\odtext32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.,*.asc,*.csv,*.tab,*.txt,*.csv"
    "SQLLevel"="0"
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft Text-Treiber (*.txt; *.csv)]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\odtext32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.,*.asc,*.csv,*.tab,*.txt,*.csv"
    "SQLLevel"="0"
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft Visual FoxPro Driver]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\vfpodbc.dll"
    "Setup"="C:\\WINDOWS\\system32\\vfpodbc.dll"
    "APILevel"="0"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.dbf,*.cdx,*.idx,*.fpt"
    "SQLLevel"="0"
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft Visual FoxPro-Treiber]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\vfpodbc.dll"
    "Setup"="C:\\WINDOWS\\system32\\vfpodbc.dll"
    "APILevel"="0"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.dbf,*.cdx,*.idx,*.fpt"
    "SQLLevel"="0"
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\MS Code Page Translator]
    "Translator"="C:\\WINDOWS\\system32\\MSCPXL32.dll"
    "Setup"="C:\\WINDOWS\\system32\\MSCPXL32.dll"
    "UsageCount"=dword:00000002
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\MS Code Page-Übersetzer]
    "Translator"="C:\\WINDOWS\\system32\\MSCPXL32.dll"
    "Setup"="C:\\WINDOWS\\system32\\MSCPXL32.dll"
    "UsageCount"=dword:00000002
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\MySQL ODBC 5.2w Driver]
    "UsageCount"=dword:00000001
    "Driver"="C:\\Arquivos de programas\\MySQL\\Connector ODBC 5.2\\Unicode\\myodbc5w.dll"
    "Setup"="C:\\Arquivos de programas\\MySQL\\Connector ODBC 5.2\\Unicode\\myodbc5S.dll"
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Core]
    "UsageCount"=dword:00000001
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers]
    "SQL Server"="Installed"
    "Microsoft Access Driver (*.mdb)"="Installed"
    "Microsoft Text Driver (*.txt; *.csv)"="Installed"
    "Microsoft Excel Driver (*.xls)"="Installed"
    "Microsoft dBase Driver (*.dbf)"="Installed"
    "Microsoft Paradox Driver (*.db )"="Installed"
    "Microsoft Visual FoxPro Driver"="Installed"
    "Microsoft FoxPro VFP Driver (*.dbf)"="Installed"
    "Microsoft dBase VFP Driver (*.dbf)"="Installed"
    "Microsoft Access-Treiber (*.mdb)"="Installed"
    "Microsoft Text-Treiber (*.txt; *.csv)"="Installed"
    "Microsoft Excel-Treiber (*.xls)"="Installed"
    "Microsoft dBase-Treiber (*.dbf)"="Installed"
    "Microsoft Paradox-Treiber (*.db )"="Installed"
    "Microsoft Visual FoxPro-Treiber"="Installed"
    "Driver do Microsoft Access (*.mdb)"="Installed"
    "Driver da Microsoft para arquivos texto (*.txt; *.csv)"="Installed"
    "Driver do Microsoft Excel(*.xls)"="Installed"
    "Driver do Microsoft dBase (*.dbf)"="Installed"
    "Driver do Microsoft Paradox (*.db )"="Installed"
    "Driver para o Microsoft Visual FoxPro"="Installed"
    "Microsoft ODBC for Oracle"="Installed"
    "Oracle em OraDb11g_home1"="Installed"
    "MySQL ODBC 5.2w Driver"="Installed"
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Translators]
    "MS Code Page Translator"="Installed"
    "MS Code Page-Übersetzer"="Installed"
    "Conversor de página de código MS"="Installed"
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Oracle em OraDb11g_home1]
    "APILevel"="1"
    "CPTimeout"="60"
    "ConnectFunctions"="YYY"
    "Driver"="C:\\app\\Administrador\\product\\11.2.0\\dbhome_1\\BIN\\SQORA32.DLL"
    "DriverODBCVer"="03.51"
    "FileUsage"="0"
    "Setup"="C:\\app\\Administrador\\product\\11.2.0\\dbhome_1\\BIN\\SQORAS32.DLL"
    "SQLLevel"="1"
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\SQL Server]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\SQLSRV32.dll"
    "Setup"="C:\\WINDOWS\\system32\\sqlsrv32.dll"
    "SQLLevel"="1"
    "FileUsage"="0"
    "DriverODBCVer"="03.50"
    "ConnectFunctions"="YYY"
    "APILevel"="2"
    "CPTimeout"="60"
    Thanks Klau!
    Edited by: 980258 on 07/01/2013 03:38

  • Editing MySQL Database from JTable

    Hello everyone, I would like to ask your help on how we can edit JTable cells that would be reflected into the database, or how do we change the database via a JTable.
    I have the installer of an application which I made with Java SE called FuelStation.exe
    My class files are ready for sharing along with its source files.
    I have placed it in this location in my website:
    http://www.apachevista.com/alphaprojects/runfiles/
    It is complete with full details about databases, proposed mysql embed, and so on. Please see the file and notify me at [email protected]
    Here is my sample code:
    // DisplayQueryResults.java
    // Display the contents of the Authors table in the
    // Books database.
    import java.awt.BorderLayout;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.sql.SQLException;
    import javax.swing.JFrame;
    import javax.swing.JTextArea;
    import javax.swing.JScrollPane;
    import javax.swing.ScrollPaneConstants;
    import javax.swing.JTable;
    import javax.swing.JOptionPane;
    import javax.swing.JButton;
    import javax.swing.Box;
    import javax.swing.JInternalFrame;
    import java.util.*; // for the Bundle
    import javax.swing.event.InternalFrameEvent;
    import javax.swing.event.InternalFrameListener;
    import javax.swing.event.InternalFrameAdapter;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import javax.swing.ListSelectionModel;
    import javax.swing.event.ListSelectionEvent;
    import javax.swing.event.ListSelectionListener;
    import javax.swing.event.*; // step 1
    import javax.swing.table.TableModel; // step 1
    public class DisplayQueryResults extends JInternalFrame implements TableModelListener { // step 2
    // JDBC driver, database URL, username and password
    ResourceBundle bundle = ResourceBundle.getBundle("Accounting");
    final String JDBC_DRIVER = bundle.getString("Driver");
    final String DATABASE_URL = bundle.getString("URL");
    final String USERNAME = bundle.getString("User");
    final String PASSWORD = bundle.getString("Password");
    // default query retrieves all data from authors table
    //static final String DEFAULT_QUERY = "SELECT authors.lastName, authors.firstName, titles.title, titles.editionNumber FROM titles INNER JOIN (authorISBN INNER JOIN authors ON authorISBN.authorID=authors.authorID) ON titles.isbn=authorISBN.isbn";
    final String DEFAULT_QUERY = bundle.getString("Query");
    private ResultSetTableModel tableModel;
    private JTextArea queryArea;
    static final int xOffset = 0, yOffset = 200;
    private boolean ALLOW_COLUMN_SELECTION = false;
    private boolean ALLOW_ROW_SELECTION = true;
    // create ResultSetTableModel and GUI
    public DisplayQueryResults() {  
    super("Sales of the Day",
    true, //resizable
    true, //closable
    true, //maximizable
    false);//iconifiable
    //...Create the GUI and put it in the window...
    //Set the window's location.
    setLocation(xOffset, yOffset);
    // create ResultSetTableModel and display database table
    try {
    // create TableModel for results of query SELECT * FROM authors
    tableModel = new ResultSetTableModel(JDBC_DRIVER, DATABASE_URL,
    USERNAME, PASSWORD, DEFAULT_QUERY);
    // set up JTextArea in which user types queries
    queryArea = new JTextArea(DEFAULT_QUERY, 1, 100);
    queryArea.setWrapStyleWord(true);
    queryArea.setLineWrap(true);
    JScrollPane scrollPane = new JScrollPane(queryArea,
    ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
    ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    // set up JButton for submitting queries
    JButton submitButton = new JButton("Submit Query");
    // create Box to manage placement of queryArea and
    // submitButton in GUI
    Box box = Box.createHorizontalBox();
    box.add(scrollPane);
    box.add(submitButton);
    // create JTable delegate for tableModel
    JTable resultTable = new JTable(tableModel);
    resultTable.setFillsViewportHeight(true); // Makes the empty space heights white
    resultTable.setRowSelectionAllowed(true);
    resultTable.getModel().addTableModelListener(this); // step 3
    // place GUI components on content pane
    add(box, BorderLayout.NORTH);
    add(new JScrollPane(resultTable), BorderLayout.CENTER);
    // create event listener for submitButton
    submitButton.addActionListener(
    new ActionListener()
    // pass query to table model
    public void actionPerformed(ActionEvent event)
    // perform a new query
    try
    tableModel.setQuery(queryArea.getText());
    } // end try
    catch ( SQLException sqlException)
    JOptionPane.showMessageDialog(null,
    sqlException.getMessage(), "Database error",
    JOptionPane.ERROR_MESSAGE);
    // try to recover from invalid user query
    // by executing default query
    try {
    tableModel.setQuery(DEFAULT_QUERY);
    queryArea.setText(DEFAULT_QUERY);
    } // end try
    catch (SQLException sqlException2) {
    JOptionPane.showMessageDialog(null,
    sqlException2.getMessage(), "Database error",
    JOptionPane.ERROR_MESSAGE);
    // ensure database connection is closed
    tableModel.disconnectFromDatabase();
    System.exit(1); // terminate application
    } // end inner catch
    } // end outer catch
    } // end actionPerformed
    } // end ActionListener inner class
    ); // end call to addActionListener
    //...Then set the window size or call pack...
         setSize(750,300);
    setVisible(true); // display window
    } // end try
    catch (ClassNotFoundException classNotFound) {
    JOptionPane.showMessageDialog(null,
    "MySQL driver not found", "Driver not found",
    JOptionPane.ERROR_MESSAGE);
    System.exit(1); // terminate application
    } // end catch
    catch (SQLException sqlException) {
    JOptionPane.showMessageDialog(null, sqlException.getMessage(),
    "Database error", JOptionPane.ERROR_MESSAGE);
    // ensure database connection is closed
    tableModel.disconnectFromDatabase();
    System.exit(1); // terminate application
    } // end catch
    // dispose of window when user quits application (this overrides
    // the default of HIDE_ON_CLOSE)
    setDefaultCloseOperation(DISPOSE_ON_CLOSE);
    // ensure database connection is closed when user quits application
    addInternalFrameListener(
    new InternalFrameAdapter() {
    // disconnect from database and exit when window has closed
    public void windowClosed(WindowEvent event) {
    tableModel.disconnectFromDatabase();
    System.exit(0);
    } // end method windowClosed
    } // end WindowAdapter inner class
    ); // end call to addWindowListener
    } // end DisplayQueryResults constructor
    public void tableChanged(TableModelEvent e) { // step 4
    int row = e.getFirstRow();
    int column = e.getColumn();
    TableModel model = (TableModel)e.getSource();
    String columnName = model.getColumnName(column);
    Object tableModel = model.getValueAt(row, column);
    // Do something with the data...
    System.out.println(tableModel);
    System.out.println("data");
    // execute application
    public static void main(String args[]) {
    new DisplayQueryResults();
    } // end main
    } // end class DisplayQueryResults
    My question is in lines 177-187:
    public void tableChanged(TableModelEvent e) { // step 4
    int row = e.getFirstRow();
    int column = e.getColumn();
    TableModel model = (TableModel)e.getSource();
    String columnName = model.getColumnName(column);
    Object tableModel = model.getValueAt(row, column);
    // Do something with the data...
    System.out.println(tableModel);
    System.out.println("data");
    Why is my listener not working or why is it not implemented when I click the cells in the JTable and why is it not reflected into the JTable or into the console?
    If this is Flash, Things can be done easily, but this is Java, and I dont know much about this language. I admit that I am new to this -intirely new.
    PS:
    When you have solved the problem, please notify me with the code that's changed
    and please share it to others if you like so.
    Best Wishes: Oliver Bob Lagumen
    Email: [email protected]
    website: www.apachevista.com
    Oliver Bob Lagumen
    Edited by: Oliverbob on Jan 24, 2008 9:03 PM

    This is a follow up on the code I have posted above.
       public void tableChanged(TableModelEvent e) { // step 4
            int row = e.getFirstRow();
            int column = e.getColumn();
            TableModel model = (TableModel)e.getSource();
            String columnName = model.getColumnName(column);
            Object tableModel = model.getValueAt(row, column);
            // Do something with the data...
            System.out.println(tableModel);
            System.out.println("data");
        }the tableChanged doesnt get called when I would click the cells. The cells are all editable, but as soon as you edit it and press enter, it snaps back to the old data.
    How do we make them editable and how do we notify java that the a cell has changed so that we can send it to the database on that specific column of that specific row?
    Thanks in advance
    Bob

  • Access to MySql Database in the Web Service

    Hi all,
    In my j2me web service project, i want to access to MySql database in the web service and
    my installation is
    Tomcat 5.0 for Java WSDP,
    Java Web Services Developer Pack 1.5,
    MySql Server 5.0 and environment variables are adjusted...
    server.xml where is in "C:\tomcat50-jwsdp\conf" is adjusted like this
    <!-- Replace the above Realm with one of the following to get a Realm
    stored in a database and accessed via JDBC -->
    <Realm className="org.apache.catalina.realm.JDBCRealm"
         debug="99"
         driverName="com.mysql.jdbc.Driver"
         connectionURL="jdbc:mysql://localhost:3306/erendb"
         connectionName="root"
         connectionPassword=""
    />
    but i have not access to MySql database in the web service yet...
    please help...

    Hi Luis,
    If you see closely, the productID is actually a concatenation of the areaID and the productID. The reasoning here is that a product can be in multiple nodes of the product catalog and one would need to specify the product on a particular node for the direct URL to work.
    On a client site, we came up with a better solution by creating a new FM to retrieve the specific areaID and productID for a product. This FM could be called by extending the webshop. Then a .NET program was written to re-direct a shortened form of the URL to the long URL and therefore the specific product in the product catalog. Eg.: http://yyyyy.com/b2c/b2c/product would be automatically redirected to http://yyyyy.com/b2c/b2c/init.do?shop=<shop name>&areaID=<area Guid>&productID=<product Guid>, something similar to the concept behind "tinyurl.com". A point to remember here is that this would work only for the B2C webshop.
    Hope this helps.
    Cheers,
    Ashok.

  • How to get data into the mySQL database?

    First some background.
    I have a website that has outgrown its designed dimensions and is a huge burden to maintain. See PPBM5 Benchmark
    There is a lot of maintenance work involved, so I'm investigating a PHP/MySQL approach to easen the burden and to add functionality to the site. With the current Excel based structure and over 420 entries, it is cumbersome for me to maintain, but also for users to find what they need.
    A MySQL based dynamic structure is a lot easier and offers vastly more selection capabilities, like selecting only records that meet specific criteria.
    Data submission is done with a form, that contains most of the relevant data, but the drawack is that people submitting their data are often not technically inclined, give wrong answers due to a lack of understanding or making typo's. The test results are attached in one or two separate .txt files, but often they have not read the instructions correctly or did something wrong, so these attached .txt files can not be trusted automatically, they have to be checked before inclusion.
    These were my initial thoughts:
    1. Data collection:
    To avoid spending all our energy and time  on correcting typo's, getting missing data, correcting errors, I am  investigating the use of CPU-Z in Ghost mode to create a .txt or .html  file that contains all relevant hardware info we need and even more. It gives all the info we currently have, but adds  data like number of memory sticks, DDR timings, stock clock speed and  BCLK setting, video card info and VRAM size, etc.
    To see what I mean, run CPU-Z, go to the About tab and press the Save Report button and look at the results.
    This can all be done without user intervention in an automatic way, but  maybe I need to add an Auto-It file to the test to make it all run as  desired.
    If this works and I'm able to extract the relevant data from the created  file and can insert it into the database, we may be in business for the  next version of PPBM5.5 or PPBM6. It does require a modification to the instructions, making them a lot  easier, because there is less data to fill out.
    2. Data submission:
    The submission form can be simplified if  the CPU-Z data can be used. We have to create an automatic way to attach  the created .html file from CPU-Z to the submission form and we have to  streamline the Output.txt and Output-MPE.txt files to be more easily included in the 'form.lib.php' file. It  currently is manual labor and very time consuming.
    3. Adding to Database:
    I have to find a way to create database  records from the Gmail forms I receive. All incoming mail messages need  to be checked on relevancy and if relevant, need to be added  automatically to the database and then offered for approval before final inclusion in the database. Data included in the database  will then include submission date and time, Email address,  IP address  used, plus links to the files submitted and available on the website.
    4. Publication of the database:
    After approval of new records from step  3, all updates will be automatically applied to the database and  accessible for users. I do not yet intend to introduce a user account ,  requesting login before all functionality is accessible. Too much trouble and administration.
    Queries should be possible on things like CPU (check box), so include  17-920, i7-930, i7-950 but exclude i7-980X and i7-990X, Size of memory  (check box), Overclocked (boolean, yes, no), SSD as OS disk, and similar  options.
    The biggest problem is to keep the color grading and statistical  indicators (Top, D9, Q3, Med, Q1 and D1) intact on dynamically generated  queries. Say you make a query which results in 20 observations, this  should show the related colors and legends. Next query results in 48 observations and of course the color grading and legends  do need to reflect that. Question in my mind, does the RPI remain  constant, independent of the query or does that need to be recalculated  on the basis of the query?
    Next thing is to allow a user to select a specific observation and by  simply clicking on it be shown, in a separate window (detail page) or  accordion, all the CPU-Z related information about the hardware.
    The graphs, Top-20 and MPE Gains, need to be dynamically adjusted, based on the query used.
    5. Ideally, external links:
    In an ideal situation, one could link the  CPU-Z data to external price databases, looking up current prices for  CPU, memory, video card, disks, raid controller, etc. to get instant  BFTB charts, based on the query made. But that is the next step.
    Situation now:
    I have a MySQL database that is easily updated with the new submissions. Simply create a .CSV flie from the submitted forms and import that into the database. The bulk of the initial work is done.Lots remain to be done as you can see above, but that is for a later time.
    Question:
    I have this table, that needs to be filled with data in the submitted and attached files. Mr. X submitted his data and can be uniquely identified by his "Ref_ID". He attached one or two files in .TXT format with the relevant test data. These files are stored on the server with a concatenated name:
    "Ref_ID","-","filename"
    Say his Ref-ID is: 20110204-6cf5 and his submitted file is called: Output(99).txt then the file can be found on the server as
    20110204-6cf5-Output(99).txt
    I need to be able to open that comma delimited file, the contents may look like this: "439","1036","819","531" and insert these contents into the relevant record and fields.
    Graphically,
    is what I want to achieve.
    This being my first exposure to PHP/MySQL, you can imagine I'm not clear on how to go from here.
    Added complication is that I actually have 5 numbers to insert per record and two calculated fields, Total Score and RPI should be calculated fields. Haven't yet figured out how to handle calculated fields, maybe only in the PHP/HTML code and not in the database.
    I hope someone can help me.

    You do have a very complex looking site and may need several tables in mysql to handle all that data. If you knew to phpmysql I would suggest taking a look at this tutorial it will help get you started in understanding how to $_GET info from a database and also how to $_POST data to a database. I am no expert just learning myself and I found this very helpful. This is the link http://www.adobe.com/devnet/dreamweaver/articles/first_dynamic_site_pt1.html
    There are also many tutorials on Youtube to help build a CMS Content Management Site I would suggest the following: -
    http://www.youtube.com/user/phpacademy
    http://www.youtube.com/user/betterphp
    http://www.youtube.com/user/flashbuilding
    And many more on my channel here
    http://www.youtube.com/user/Whisperingonthewind
    CMS's are easier to maintain, add edit and delete content.
    I have also recently bought a Book by David Powers Training from the Source very helpful.
    Anyway hope you get it sorted.

  • Does Time Machine back up MySQL database?

    My medical practice billing software runs on MySQL. I upgraded to Leopard specifically to enable Time Machine backups - more frequent than nightly backups, with recovery much faster in the event of problems in the middle of a busy day. The software vendor tech rep stated that the MySQL database is not backed up by Time Machine. That seems very strange, since it backs up all the System files and everything else not specifically excluded. Am I missing something?

    I don't understand what he said. It sounds like something to do with the Exclude list of TM preferences. Are you only backing up the MacPractice folder or is TM backing up your entire hard drive? What it reads to me is that if you backup only the MacPractice folder that the folder does not include the MySQL database. That is correct since MySQL creates the database file in its own special folder. But if you backup the entire hard drive then everything is backed up including the database files.
    BTW, since this is a business entity I would strongly advise that you not rely entirely on Time Machine backups. TM can be finicky and unreliable. Potential problems escalate when you use a Time Capsule because of the mechanism TM uses for backing up networked drives such as TC.
    I would recommend you use another backup utility and do additional backups to other external or internal drives depending upon what your computer supports. You should also make at least one separate full backup archive monthly that can be stored off-site in the case of theft, vandalism, storm, earthquake, or other hazard that could result in loss of data. See the following:
    Basic Backup
    Get an external Firewire drive at least equal in size to the internal hard drive and make (and maintain) a bootable clone/backup. You can make a bootable clone using the Restore option of Disk Utility. You can also make and maintain clones with good backup software. My personal recommendations are (order is not significant):
    1. Retrospect Desktop (Commercial - not yet universal binary)
    2. Synchronize! Pro X (Commercial)
    3. Synk (Backup, Standard, or Pro)
    4. Deja Vu (Shareware)
    5. Carbon Copy Cloner (Donationware)
    6. SuperDuper! (Commercial)
    7. Intego Personal Backup (Commercial)
    8. Data Backup (Commercial)
    The following utilities can also be used for backup, but cannot create bootable clones:
    1. Backup (requires a .Mac account with Apple both to get the software and to use it.)
    2. Toast
    3. Impression
    4. arRSync
    Apple's Backup is a full backup tool capable of also backing up across multiple media such as CD/DVD. However, it cannot create bootable backups. It is primarily an "archiving" utility as are the other two.
    Impression and Toast are disk image based backups, only. Particularly useful if you need to backup to CD/DVD across multiple media.
    Visit The XLab FAQs and read the FAQs on maintenance, optimization, virus protection, and backup and restore. Also read How to Back Up and Restore Your Files.
    Although you can buy a complete FireWire drive system, you can also put one together if you are so inclined. It's relatively easy and only requires a Phillips head screwdriver (typically.) You can purchase hard drives separately. This gives you an opportunity to shop for the best prices on a hard drive of your choice. Reliable brands include Seagate, Hitachi, Western Digital, Toshiba, and Fujitsu. You can find reviews and benchmarks on many drives at Storage Review.
    Enclosures for FireWire and USB are readily available. You can find only FireWire enclosures, only USB enclosures, and enclosures that feature multiple ports. I would stress getting enclosures that use the Oxford chipsets (911, 921, 922, for example.) You can find enclosures at places such as;
    Cool Drives
    OWC
    WiebeTech
    Firewire Direct
    California Drives
    NewEgg
    All you need do is remove a case cover, mount the hard drive in the enclosure and connect the cables, then re-attach the case cover. Usually the only tool required is a small or medium Phillips screwdriver.

  • Upload image into mysql database residing on  remote server is not working?

    hello to all,
    i need ur help,we hav online site .
    i have to upload image(which can b from any pc) into mysql database residing on remote server of which we (don't hav actual path of that server).
    the solution i'm using is working correctly on local bt when transfer it to server it shows
    java.io.FileNotFoundException: (No such file or directory)
    i have used multipartRequest to access parameter of file type input.
    all variables and related packages r imported properly.no prblm in that.
    code is here....................................
    try {
    MultipartRequest multi = new MultipartRequest(request, ".", 500000 * 1024);
    File f = multi.getFile("uploadfile");
    out.println(f.getName());
    filename = f.getName();
    String type = multi.getContentType(f.getName());
    fis=new FileInputStream(filename);
    byte b[]=new byte[fis.available()];
    fis.read(b);
    fis.close();
    Blob blob=new SerialBlob(b);
    Class.forName("com.mysql.jdbc.Driver");
    Connection con=DriverManager.getConnection("jdbc:mysql://10.1.52.206:3306/test?user=root&password=delhi");
    String query="insert into uploads (FILENAME,BINARYFILE,) values (?,?)";
    pstmt=con.prepareStatement(query);
    pstmt.setString(1,filename);
    pstmt.setBlob(2,blob);
    int i=pstmt.executeUpdate();
    if(i>0)
    out.println("Image Stored in the Database");
    else
    out.println("Failed");
    } catch (Exception ex) {
    out.print("*******************"+ex);
    ex.printStackTrace();
    please suggest me the way to upload image to remote server** not on local server.
    its urgent.
    Edited by: JavaDevS on Jul 28, 2008 11:41 AM

    i need ur help,we hav online site .Please don't use these juvenile abbreviations. It's impolite when you're asking for assistance not to make the effort to spell out all of the words. Moreover in a forum with an international readership the use of standard English will reduce the possibility of confusion.
    I presume that your file upload is being placed in a different directory from that which you were expecting. I would suggest logging all paths (specifically filename) to see if this is an unexpected value.
    Please explain further what you mean by "local" - is this a stand-alone application, or merely running a copy of the server on your local machine and doing the transfer (via the browser) to that? Are there any other differences such as the browser used?

  • ***No Table found, when creating a recordset to MySQL Database

    I have made a successful connection to the MySQL database.
    When attempting to create a record set (Query) under the Application/Bindings Tab, I select the connection, but then the Table field says *** No Table Found
    Also under Application/Databases tab, the connections appear. When expanding the + for the Table it says "None"
    I do have Tables in the MySQL database which Dreamweaver has a connection to, so that is not the problem.
    I've searched multiple forums on the internet for this problem, and while I have found that others have had this problem, I have not seen any solutions.
    Any help would be greatly appreciated.
    I am a novice in this area, so if you need any additional information from me, please be as specific as possible as to where and how I can get it.
    Thank you in advance for your help.
    Additional information:
    Windows 7 Ultimate
    Dreamweaver CS3 (Creative Suite 3 Web Premium)
    Apache 2.2.15-win32-x86-openssl-0.9.8m-r2
    PHP-5.2.6-Win32
    mysql-workbench-gpl-5.2.25-win32
    Freshly reformatted computer and only installed the above software along with AVG antivirus.
    Edit: I should also note that this is for a local testing server. I am not trying to connect remotely.
    Best Regards,
    Blain
    Message was edited by: Blain1976

    Now the problem has gone from bad to worse.
    I previously had a connection to my database but just couldn't see the tables.
    Now after I added another user I can't even make a connection. Instead I get an error message that says "An unidentified error has occured"
    My server and database are actually running. I can loginto my database through the MySQL workbench. It says it's running. The apache server also says it's running and if I key in localhost in my internet explorer it says "It works!"
    I have now deleted the new user in MySQL  that I added and now I can't even connect to the database in Dreamweaver.
    Any suggestions?
    Thank you,
    Blain

Maybe you are looking for

  • THE WORDS IN MY TITLES...... AREN'T SHOWING UP WHEN I PLAY THE DVD's ON TV!

    I'm using two different title windows....LOWER THIRD & UPPER. The words show up fine on the computer but in playing the completed DVD's in the DVD player, the LOWER THIRD bottom line and the UPPER only line, aren't appearing on the TV screen. I'm usi

  • I just need to cancel my adobe export to PDF and get my refund

    I Want to cancel my subscription. It does not do what I want it to do.

  • Runtime Error When Using Recovery CDs

    Hi. I had a HDD failure on this notebook. I got a SSD to replace it with (on my own) and got the recovery DVDs from HP. After 3 hours of trying to install the recovery DVDs to the SSD only to have it fail in the last seconds because it couldn't write

  • Pivot with zeros as values PLZ....

    hi experts, let me explain my requirement: i have created a pivot table with the following coloumns date 1:00am 2:00 am 3:00 am..... 1/2/2010 2 2 45 2/3/2011 56 when i tried to filter the date with 2/3/2011 then the result is like this date 3:00 am..

  • Queues across multiple executables

    can named queues operate across multiple executables? if so I imagine that i can send a queue name via command line switch? - James Using LV 2012 on Windows 7 64 bit