Connect to a mysql database with Oracle 9i

Hello,
how can I connect to a non_oracle-database in "Oracle 9i".
I created a ODBC data source. In Oracle8 I needed OCA. But in 9i I believe the OCA is replaced by another thing.
I wanted to connect in SQL*PLUS with:
username/password@odbc:mysql
But I get the error: ora-03121 "no interface driver connected - function not performed".
How can I connect to another database?

I've solved the DW problem by changing the site folders from
'db' to 'wwwroot' e.g. 'C:\CFusionMX\db\' is now
'C:\CFusionMX\wwwroot\
However I'm now back to my original problem. I've lost my
mqysql connection in CF Adminstrator. Before I made these changes I
could connect to my mysql databases using the following settings:
JDBC URL: jdbc:mysql://localhost:3306/test
Driver Name: MySQL Connector J
using the following Java path and file:
C:\CFusionMX\wwwroot\WEB-INF\lib\mysql-connector-java-3.0.17-ga-bin.jar
Now these settings give me the following error:
"Connection verification failed for data source: javaserver
[]java.sql.SQLException: SQLException occurred in JDBCPool
while attempting to connect, please check your username, password,
URL, and other connectivity info.
The root cause was that: java.sql.SQLException: SQLException
occurred in JDBCPool while attempting to connect, please check your
username, password, URL, and other connectivity info"
Any suggestions on this would also be welcome.
Thanks again to everyone for their help.
Sincerely,
Graham A. Kerby

Similar Messages

  • Mysql database with oracle reports

    hey guys
    Can I use report triggers applying pl/sql editor to access mysql database? or is there another way to use report triggers to use mysql database?
    Thanks

    You need to install the mysql connector odbc and then create an ODBC dns for your database.
    control panel, administrative, odbc

  • PHP Connection to a MySQL database "An unidentified err has occurred"

    This is driving me up the wall.... With my hosting provider
    at work I cannot make a connection to a MySQL database with
    dreamweaver using the new connection in the databases tab. "an
    unidentified error has occurred"
    I am certain that I am entering the info correctly and have
    the correct permissions to access the database, I think it has to
    do with the _mmServerScripts folder and the testing server.
    With the hosting provider that I use for personal websites I
    make connections all day long doing the exact same thing that I am
    doing here at work and I'm stumped. I even read a lenghty article
    on this forum with possible solutions... none of them worked.
    Is there any way around the _mmServerScripts directory and
    testing server to make a connection and then use the bindings and
    server behaviors tabs to creat recordsets, etc??
    Thanks in advance for any help!
    George

    o0knightro wrote:
    > Is there any way around the _mmServerScripts directory
    and testing server to
    > make a connection and then use the bindings and server
    behaviors tabs to creat
    > recordsets, etc??
    Not if you want to use Dreamweaver server behaviors, no. The
    usual
    meaning of "an unidentified error has occurred" is failure to
    connect
    because communication is blocked by a firewall.
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • CONNECTING ORACLE 9I OR 10G DATABASE WITH ORACLE 10G FORMS AND REPORTS

    pls tell how to connect oracle 9i or 10g database with oracle developer suite 10g . though the forms are getting connected but not running with error as
    FRM-10142 the HTTP listner is not running on pls start the listner or check your runtime preferences.
    now pls tell how to start listner and how to chage runtime preferences.
    though i have worked with oracle 9i and forms 6i where we used to copy the tnsnames.ora from network/admin of oracle to forms 6i tnsnames.ora.
    thank you, you may be thinking such a long question.....

    sir
    By server i mean the computer where oc4j and backend database are running is one one of the client pc not a dedicated server..., these database and 10g dev suite are installed in one of the client machine,
    all the clients are using same internet explorer as browser.
    no message is being displyed on some of the client machine where these forms are not being uploaded on browser instead it displays as done in status bar without actually showing anything at all...
    sir so far as jinitiator or JRE is concered i have seen on the client machine (where my forms are running on internet explorer) a pop up is displyed telling one activex control is required to run this program and click to install it..
    after clicking it download jinitiator from server and after installing jinitiator my forms are loaded and start functioning...
    what i feel is as i said this machine where oc4j and database is running is one of the client machine so some other clients do not have acess to this machine, so this might be the reason why those clints are not able to run the said forms on the internet explorer.... can it be so... kindly tell..
    thank you for your patience for reading the question

  • How to connect mySQL database with jdbc

    Who can tell me how to connect mySQL database with jdbc? Thanks

    http://onesearch.sun.com/search/developers/index.jsp?and=connect+mysql&nh=10&phr=&qt=&not=&field=title&since=&col=devforums&rf=0&Search.x=24&Search.y=16

  • How to connect MySql database with JSP

    Dear everyone,
    how to connect MySql database with JSP......

    It's too bad that nobody has ever asked this question before...

  • Can APEX/ORACLE connect to a mysql database?

    Hi
    Just wondered whether APEX and ORACLE could connect to mysql database. I may have a requirement to link to a mysql database and retrieve the data and wondered if APEX could do this.
    Thanks

    Hi
    Apex sits within the Oracle database. Oracle can connect to a mysql database via a database link so yes this is certainly possible. We connect extensively to an Informix database here actually. This is really an oracle question though so you just need to look in the documentation for the CREATE DATABASE LINK command and for setting up the actual connection.
    If you need more help let me know.
    Cheers
    Ben

  • Connecting MS-Access database with Oracle Forms

    Hai,
    Can any one suggest as to how I can connect MS-Access database
    with Oracle Developer Forms. What is the procedure ? Suggest me
    if I need to install any drivers. Waiting for an early reply.
    Warm Regards,
    Raghav.
    email:[email protected]

    Not possible as far as I know.
    Probably because ODBC itself (the defined interface) doesn't support it.
    There is a commercial MS Access (java only) driver that might support it.

  • Accessing mysql database from oracle using dg4odbc

    I've been trying to create a database link from a MySQL database to Oracle using the Oracle dg4odbc gateway. I downloaded and installed DataDirect's ODBC package which includes mysql ODBC library (ddmysql24.so) and a generic ODBC libary (libodbc.so). After creating the DSN in odbc.ini, I tested it and it can connect to the mysql database. Then I created the init{SID}.ora file in hs/admin directory, added dg4odbc lines in the listener.ora, and added lines in tnsnames.ora. Then I tnspinged the new SID with success. Finally, I created the database link. However, when I tried to access the database link using the commands "select * from mdl_user@moodle;", I got the ORA-28500 error like the following:
    ERROR at line 1:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [DataDirect][ODBC 20101 driver][20101]You have an error in your SQL syntax;
    check the manual that corresponds to your MySQL server version for the right
    syntax to use near '"mdl_user"' at line 1
    ORA-02063: preceding 2 lines from MOODLE
    My mysql database is utf8 by default. Do I have to use latin1?
    It seems to me that the dg4odbc translates the sql commands incorrectly (having double quotes around the selected table).
    Any help is greatly appreciated.
    Jeffrey

    The syntax error occures for example when MySQL isn't running in ANSI mode and thus does not allow double quotes around the objects. DG4ODBC 11.1.0.6 by default always adds double quotes to table/column/view names.
    A quick test to check if you hit the double quote issue would be to set the MySQL DB into ANSI mode:
    - Open SQL*Plus
    - execute:
    DECLARE
    ret integer;
    c integer;
    BEGIN
    c := DBMS_HS_PASSTHROUGH.OPEN_CURSOR@moodle;
    DBMS_HS_PASSTHROUGH.PARSE@moodle(c, 'SET SESSION SQL_MODE=''ANSI_QUOTES'';');
    ret := DBMS_HS_PASSTHROUGH.EXECUTE_NON_QUERY@moodle(c);
    dbms_output.put_line(ret ||' passthrough output');
    DBMS_HS_PASSTHROUGH.CLOSE_CURSOR@moodle(c);
    END;
    - Now run your select statement
    => if it now works, you can permanently change the MySQL config to be ANSI compliant or you can apply the 11.1.0.7 patchset to DG4ODBC.

  • How to conncet mysql database and oracle database 11g2 on linux 5.4

    Hi,
    Can anyone help me to connect mysql server database to Oracle
    database on Linux OS?
    I have done all things, but I am getting a problem in installing dg4odbc
    driver on Oracle database. In a simple word, I don't know how to create
    listener between mysql database and Oracle database.
    If anyone knows that please help me in configuring dg4odbc for Oracle. OS
    -Linux 5.4 and refer any doc or link.
    oracle 11g2 11.2.0.1
    i follow the metalink id - 466228.1 ( but cant successed).
    Thanks and regards,
    pritesh ranjan

    hi pl z clear me it is required to install manully the dg4odbc driver for oracle to connect MySQL server database. because in my $ORACLE_HOME/hs/admin/initdg4odbc.ora is present automatically.
    details of the initdg4odbc.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 = mysql_odbc
    HS_FDS_TRACE_LEVEL = off
    HS_FDS_SHAREABLE_NAME = /usr/lib/libmyodbc5w.so
    # ODBC specific environment variables
    set ODBCINI=/etc/odbc.ini
    set LD_LIBRARY_PATH=/usr/lib
    # Environment variables required for the non-Oracle system
    #set HOME=/home/oracle
    ~
    ~
    ~
    "initdg4odbc.ora" 20L, 437C
    details of the listener.ora file
    DG4ODBC =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA=(SID=dg4odbc))
    (HS=OK)
    SID_LIST_ORCL =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = orcl)
    (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
    (SID_NAME = ORCL)
    ADR_BASE_DG4ODBC = /u01/app/oracle
    ORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = pritesh11gprim.oracle.com)(PORT = 1521))
    ADR_BASE_ORCL = /u01/app/oracle
    "listener.ora" [readonly] 37L, 779C 35,0-1 85%
    details of tnsname.ora file
    # tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
    # Generated by Oracle configuration tools.
    ORCL =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.132)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = ORCL)
    DG4ODBC =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))
    (CONNECT_DATA=(SID=DG4ODBC))
    (HS=OK)
    MYSQL =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))
    (CONNECT_DATA=(SID=MYSQL))
    (HS=OK)
    when i m going to start the listener it could not be started..
    details of the mysql server database
    [root@pritesh11gprim ~]# mysql -u root -p
    Enter password:
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 2
    Server version: 5.6.10 MySQL Community Server (GPL)
    Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    mysql>
    mysql> show databases;
    | Database |
    | information_schema |
    | demo |
    | mysql |
    | performance_schema |
    | pritesh |
    | test |
    6 rows in set (0.01 sec)
    if any where i m wrong then plz suggest me......
    thanks & regards
    pritesh ranjan

  • Connecting to a Mysql database using CF Administrator and DW

    I can't create a mysql datasource in CF Administrator.
    If I use the following datasource settings in CF
    Administrator:
    JDBC URL: jdbc:mysql://localhost:3306/test
    Drive Class: MySQL Connector J
    AND (note the emphasis) I set my local and remote folders in
    my DW site local folder, remote folder and testing server folders
    all to C:\CFusionMX\db\, I can connect to my mysql database in CF
    Administrator.
    However, with these DW site folder settings, DW doesn't
    recognize any databases (Access or Mysql) at all.
    When I change my DW site folder settings to 'wwwroot'
    (e.g.local folder C:\CFusionMX\db\' is changed to
    'C:\CFusionMX\wwwroot') DW now lists all my CF Administrator
    databases.
    The problem is CF Administrator can't connect to my Mysql
    data sources. It gives me the error:
    "Connection verification failed for data source: javaserver
    []java.sql.SQLException: SQLException occurred in JDBCPool
    while attempting to connect, please check your username, password,
    URL, and other connectivity info.
    The root cause was that: java.sql.SQLException: SQLException
    occurred in JDBCPool while attempting to connect, please check your
    username, password, URL, and other connectivity info"
    I've tried changing the 3306 port to 8500, but this doesn't
    help.
    My java path and connector file is:
    C:\CFusionMX\wwwroot\WEB-INF\lib\mysql-connector-java-3.0.17-ga-bin.jar,
    Is this a ID/password problem? I've tried both 'root' and
    leaving the ID field in the CF Administrator add data source block,
    both to no avail. I don't have a password set in Mysql for 'root'
    either.
    Any help would be gratefully appreciated. I've been working
    on this for weeks and keep running into one problem after another.
    Thanks a million in advance.
    Sincerely,
    Graham A. Kerby

    1) ensure mysql server is running
    2) there are numerous tutorials for mysql installation out
    there
    3) there are good free mysql admin tools out there
    4) use both the above to verify your mysql installation is
    correct
    5) please tell me you do have your zonealarm DISABLED
    hth
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com

  • Connecting to a Mysql database using a ColdFusion server

    can't create a mysql datasource in CF Administrator.
    If I use the following datasource settings in CF
    Administrator:
    JDBC URL: jdbc:mysql://localhost:3306/test
    Drive Class: MySQL Connector J
    AND (note the emphasis) I set my local and remote folders in
    my DW site local folder, remote folder and testing server folders
    all to C:\CFusionMX\db\, I can connect to my mysql database in CF
    Administrator.
    However, with these DW site folder settings, DW doesn't
    recognize any databases (Access or Mysql) at all.
    When I change my DW site folder settings to 'wwwroot'
    (e.g.local folder C:\CFusionMX\db\' is changed to
    'C:\CFusionMX\wwwroot') DW now lists all my CF Administrator
    databases.
    The problem is CF Administrator can't connect to my Mysql
    data sources. It gives me the error:
    "Connection verification failed for data source: javaserver
    []java.sql.SQLException: SQLException occurred in JDBCPool
    while attempting to connect, please check your username, password,
    URL, and other connectivity info.
    The root cause was that: java.sql.SQLException: SQLException
    occurred in JDBCPool while attempting to connect, please check your
    username, password, URL, and other connectivity info"
    I've tried changing the 3306 port to 8500, but this doesn't
    help.
    My java path and connector file is:
    C:\CFusionMX\wwwroot\WEB-INF\lib\mysql-connector-java-3.0.17-ga-bin.jar,
    Is this a ID/password problem? I've tried both 'root' and
    leaving the ID field in the CF Administrator add data source block,
    both to no avail. I don't have a password set in Mysql for 'root'
    either.
    Any help would be gratefully appreciated. I've been working
    on this for weeks and keep running into one problem after another.
    Thanks a million in advance.
    Sincerely,
    Graham A. Kerby

    If it were me I would use the MySQL JDBC driver and not ODBC. Then DSN versus not-DSN wouldn't be an issue.

  • How do I connect to a DB2 database from Oracle 10G on linux?

    Hi
    I have tryed to connect to a DB2 database from oracle 10 G on linux.
    I have installed unixODBC and a db2 odbc driver. I can connect to the db2 using isql, but oracle comes with this error:
    select * from testtable@acc_spc_gr2
    ERROR at line 1:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Generic Connectivity Using ODBC]DRV_InitTdp: DB_ODBC_INTERFACE (718): ; [C077]
    Could not find symbol 'SQLAllocConnect' in dynamic library
    DB_ODBC_INTERFACE (722): ; [C079] Failed to load dynamic library
    '/opt/ibm/iSeriesAccess/lib/libcwbodbc.so'
    ORA-02063: preceding 3 lines from ACC_SPC_GR2
    What am I doing wrong? Any one have a guide to do this?
    - Jesper

    this is my complete configuration
    Database_
    -bash-3.2$ export ORACLE_SID=XE
    -bash-3.2$ sqlplus "/as sysdba"
    SQL*Plus: Release 10.2.0.1.0 - Production on Mié Jul 7 10:04:43 2010
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Conectado a:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    Platform_
    Linux srvpdf 2.6.18-164.el5xen #1 SMP Thu Sep 3 04:47:32 EDT 2009 i686 i686 i386 GNU/Linux
    */usr/lib/oracle/xe/app/oracle/product/10.2.0/server/hs/admin/initDB2DATABASE.init*
    #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 = ODBC_DSN
    HS_FDS_CONNECT_INFO = prueba
    HS_FDS_TRACE_FILE_NAME = /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/hs/admin/DB2DATABASE.log
    HS_FDS_CONNECT_INFO = DB2DATABASE
    #HS_FDS_TRACE_LEVEL = debug
    HS_FDS_TRACE_LEVEL = 0
    HS_FDS_SHAREABLE_NAME = /opt/ibm/iSeriesAccess/lib/libcwbodbc.so
    # ODBC specific environment variables
    set ODBCINI=/etc/odbc.ini
    # Environment variables required for the non-Oracle system
    set DB2INSTANCE=is400
    listener.ora_
    # listener.ora Network Configuration File:
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /usr/lib/oracle/xe/app/oracle/product/10.2.0/server)
    (PROGRAM = extproc)
    (SID_DESC =
    (SID_NAME = DB2DATABASE)
    (ORACLE_HOME = /usr/lib/oracle/xe/app/oracle/product/10.2.0/server)
    (PROGRAM =hsodbc)
    (ENVS = LD_LIBRARY_PATH = /opt/ibm/iSeriesAccess/lib:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.18.3.32)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.18.3.31)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    DEFAULT_SERVICE_LISTENER = (XE)
    tnsnames.ora_
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = srvpdf)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = XE)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    DB2DATABASE =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST =localhost )(PORT=1521))
    (CONNECT_DATA =
    (SERVICE_NAME = DB2DATABASE)
    (HS=OK)
    odbc.ini_
    [prueba]
    Description = iSeries Access ODBC Driver
    Driver = iSeries Access ODBC Driver
    System = xxx.xx.3.2
    UserID = xxxxxx
    Password = xxxxxx
    Naming = 0
    DefaultLibraries = QGPL
    Database = CHERRYWEB
    ConnectionType = 0
    CommitMode = 2
    ExtendedDynamic = 0
    DefaultPkgLibrary = QGPL
    DefaultPackage = A/DEFAULT(IBM),2,0,1,0,512
    AllowDataCompression = 0
    MaxFieldLength = 32
    BlockFetch = 1
    BlockSizeKB = 128
    ExtendedColInfo = 0
    LibraryView = 0
    AllowUnsupportedChar = 0
    ForceTranslation = 0
    Trace = 0
    odbcinst.ini_
    [PostgreSQL]
    Description = ODBC for PostgreSQL
    Driver = /usr/lib/libodbcpsql.so
    Setup = /usr/lib/libodbcpsqlS.so
    FileUsage = 1
    [iSeries Access ODBC Driver]
    Description = iSeries Access for Linux ODBC Driver
    Driver = /opt/ibm/iSeriesAccess/lib/libcwbodbc.so
    Driver64 = /opt/ibm/iSeriesAccess/lib64/libcwbodbc.so
    Setup = /opt/ibm/iSeriesAccess/lib/libcwbodbcs.so
    Setup64 = /opt/ibm/iSeriesAccess/lib64/libcwbodbcs.so
    UsageCount = 1
    CPTimeout =
    CPReuse =
    System = 172.18.3.2
    User = inf5mito
    Password = lonco3pue
    NOTE1 = If using unixODBC 2.2.11 or later and you want the 32 and 64-bit ODBC drivers to share DSN's,
    NOTE2 = the following Driver64/Setup64 keywords will provide that support.
    Threading = 2
    DontDLClose = 1
    ODBC Driver_
    -bash-3.2$ cd /opt/ibm/iSeriesAccess/lib
    -bash-3.2$ ls -ltr
    total 2260
    -r-xr-xr-x 1 root root 443939 Apr 5 2008 libcwbxda.so
    -r-xr-xr-x 1 root root 94504 Apr 5 2008 libcwbrc.so
    -r-xr-xr-x 1 root root 16636 Apr 5 2008 libcwbodbcs.so
    -r-xr-xr-x 1 root root 729572 Apr 5 2008 libcwbodbc.so
    -r-xr-xr-x 1 root root 998060 Apr 5 2008 libcwbcore.so
    and this is my error.
    SQL> /
    select from display@db2database*
    ERROR en línea 1:
    ORA-28500: la conexión de ORACLE a un sistema no Oracle ha devuelto este
    mensaje:
    *[Generic Connectivity Using ODBC][C077] Could not find symbol 'SQLAllocConnect'*
    in dynamic library
    *[C079] Failed to load dynamic library*
    *'/opt/ibm/iSeriesAccess/lib/libcwbodbc.so'*
    ORA-02063: 3 lines precediendo a DB2DATABASE
    Edited by: user6669081 on 07-jul-2010 6:31

  • How to connect to a MySQL database in another server

    Dear friends,
    I am using Oracle SQL Developer 1.5.3 and I need to connect to a MySQL database located in another server.
    I am trying to create a new connection, informing connection name, username and password. Supposing that "Hostname" is the IP server address, I click on "Choose database", but I always receive the following error message: "Status : Failure - Cannot connect to MySQL server".
    Please tell me what I should do to solve this situation. Thanks in advance.
    Best regards,
    Franklin

    You need to configure your mysql database to accept connection from your PC for the user you used.
    For example,
    GRANT ALL ON *.* TO 'someuser'@'somehost';
    FLUSH PRIVILEGES;

  • Is it possible to insert data into a MySQL database with Java?

    Hello everyone!
    I would like to know, if it's possible to insert data into a MySQL database, with a JFrame inside a servlet?
    When the JFrame is first created it calls this method:
         * Connects the servlet with the MySQL database.
        private void connect(){
            try{
                Class.forName("com.mysql.jdbc.Driver");
                connection = DriverManager.getConnection(
                        "jdbc:mysql://localhost:3306/data", "root", "omfg123");
            }catch(ClassNotFoundException cnfe){
                cnfe.printStackTrace();
            }catch(SQLException sqle){
                sqle.printStackTrace();
        }Then, when you click the "Add" button, it executes this code:
                add.addActionListener(new ActionListener(){
                    @Override
                    public void actionPerformed(ActionEvent ae){
                        String employee = employeeName.getText();
                        String[] args = employee.split(" ");
                        firstName = args[0];
                        lastName = args[1];
                        execute();
                });And this is my "execute()" method:
         * Connects the servlet with the MySQL database.
         * - And executes the SQL queries.
        private void execute(){
            try{
                PreparedStatement statement = connection.prepareStatement("insert" +
                        " into employees values(" + firstName + ", " + lastName
                        + ")");
                ResultSet result = statement.executeQuery();
                String fullName = firstName + " " + lastName;
                printer.write("Employee " + fullName + " added.</br>");
            }catch(SQLException sqle){
                sqle.printStackTrace();
        }But when I click the "Add" button, nothing happens.

    This is what I use to insert into mysql. It works on windows.
    try {
                Class.forName("com.mysql.jdbc.Driver");
                String connectionUrl = "jdbc:mysql://" + loadip + "/custsig?" +
                        "user=root&password=";
                Connection con = DriverManager.getConnection(connectionUrl);
                newproc = jTextField1.getText();
                newsoft = jTextField2.getText();
                newdeb = jTextField3.getText();
                newcust = jTextField4.getText();
                if (newcust.equals("")) {
                    errorsig12 = 1;
                    jLabel1.setForeground(new java.awt.Color(255, 0, 0));
                } else if (newsoft.equals("")) {
                    errorsig12 = 1;
                    jLabel2.setForeground(new java.awt.Color(0, 0, 0));
                } else if (newproc.equals("")) {
                    errorsig12 = 1;
                    jLabel3.setForeground(new java.awt.Color(0, 0, 0));
                } else if (newdeb.equals("")) {
                    errorsig12 = 1;
                    jLabel4.setForeground(new java.awt.Color(0, 0, 0));
                if (errorsig12 == 0) {
                    PreparedStatement ps = con.prepareStatement("insert into customer set cust_name = ?,  software = ?, processor = ?, debit = ?");
                    ps.setString(4, newdeb);
                    ps.setString(3, newproc);
                    ps.setString(2, newsoft);
                    ps.setString(1, newcust);
                    int rs = ps.executeUpdate();
            } catch (SQLException eg) {
                System.out.println("SQL Exception: " + eg.toString());
            } catch (ClassNotFoundException cE) {
                System.out.println("Class Not Found Exception: " + cE.toString());
            }

Maybe you are looking for

  • Problem calibration , ink tonner cartridge

    Hi , i've got a c4480 printer , and i've got problem with cartridge and allignement , on the screen it appears incopatible print cartridge , i did the start button + cancel to reset the printer , i've reset it and then , i've tryed to callibrate it a

  • Entering a component name in column New Name causes ecxeption

    Hi peoples, It's not the first time i encounter this problem. I select a basic action in the Test Case Editor. Then i select it and try to enter a component name in the column 'New Name'. After entering the first tokens suddenly an error message pops

  • Need Help Regarding Enabling The Matrix

    Hi All, We have got one user form and we have got one choose from list and one matrix, on click of choose from list the value will be displayed in the text box and at the same time matrix should get enabled. But it;s not happening in our case. The va

  • Enterprise License Manager 9.1 used Ports

    Hi All What are the ports need to be opened between Enterprise License Manager standalone server and CUCM/CUC Publisher to communicate I searched the below documents but not able to find the required details http://www.cisco.com/en/US/docs/voice_ip_c

  • High redo log buffer wait

    Hi, I can see "high redo log buffer wait" event. The instance spent 23% of its resources waiting for this event. Any suggestion to tune redo log buffer? DB version : 10.2.0.4.0 Os : AIX SQL> SELECT name, value FROM v$sysstat WHERE name = 'redo log sp