Connection to mySQL via jdbc

I'm currently programming a GUI to access a database. Therefore I executed a query, which worked fine. But when I tried to exit my program with
System.exit(0)my DOS-Prompt crashes without exiting.
Now I tried it with a kind of minimalistic Connection like that:
Class.forName("org.gjt.mm.mysql.Driver");
Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/stock");     
conn.close();Here the same problem occurs, so it must be the Connection that causes the error.
If I would exit the program right away after the Connection, that is
Class.forName("org.gjt.mm.mysql.Driver");
Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/stock");     
conn.close();
System.exit(0);then the program exits properly. Unfortunately it doesn't make any sense to quit the program right after reading the data.
So, as you can guess, I'm quite confused. I used the same driver and the same database in another program on the same computer, and it works fine. So I'm left totally clueless.
I'm not using a special programming environment, I just write my code using UltraEdit. I've got installed Java 1.4.0 on my machine.
Any help is very appreciated
Martin

I don't get any.
It just crashes. There's neither an exception thrown nor any other error msg.

Similar Messages

  • Remotley connect to mySql via mm.mysql

    Hello,
    I'm running WIN2k, JDK 1.2.1_004 and I'm trying to make a local java application to connect to mysql on my web server via mm.mysql. But it doesn't work
    I get the following error:
    SQLState: 08001
    Message: No suitable driver
    Vendor: 0
    I've tried to connect via the ip:
    Connection con = DriverManager.getConnection ("jdbc:mysql://64.176.118.240:3306/grattiskort_com?user=grattis&password=");
    And domain name
    Connection con = DriverManager.getConnection ("jdbc:mysql://grattiskort.com:3306/grattiskort_com?user=grattis&password=");
    I have enabled remote connection in mysql config.
    Do I need to install the driver on my web server too, and if so, how do I do that?
    Does anyone have a clue what's wrong?
    Regards,
    Chrille

    Message: No suitable driverWhere do you load the driver?

  • Connection to MySQL via ODBC not working

    Hello all together,
    I've got a problem with the ODBC connection to MySQL. The connection via ODBC is established and things like tnsping are working.
    When I select some data within the SQL*Plus environment, I get no real result. For example "select table_name from all_tables@mysql;" returns nothing.
    My entry in listener.ora:
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME=odbc_mysql)
    (ORACLE_HOME=D:\oracle\product\11.0.1\db_1)
    (PROGRAM=dg4odbc)
    My entry in tnsnames.ora:
    MYSQL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA = (SID=odbc_mysql))
    (HS=OK)
    The initodbc_mysql.ora in ORACLE_HOME/hs/admin/:
    HS_FDS_CONNECT_INFO = odbc_mysql
    HS_AUTOREGISTER = TRUE
    HS_DB_NAME = hsodbc
    I tried some modifications but I still get no data from mysql database. When I try "select * from customer@mysql;" I get the correct number of records, the correct column names, but the content is always "¬¬¬¬". The odbc driver works, because with MS Access I can fetch the data. I'm using Oracle 11g Release 1 EE and MySQL ODBC 5.1.5.
    What could be the reason for this?
    Greetings,
    Joerg

    created in my UTF-8 Mysql DB your table and inserted a record; the select shows:
    SQL> select * from "movieclass"@mysql;
    idClass
    ClassName
    123
    H e l l o
    As you can see the content is there, the "space" between the letters is related to unicode. Each character is interpreted by 2 bytes and SQL*Plus wrongly displays both. Using iSQLPLus or SQLDeveloper does not show the "space" between the letters.
    Here the data type mapping:
    SQL> desc "movieclass"@mysql;
    Name Null? Type
    idClass NUMBER(3)
    ClassName NOT NULL NVARCHAR2(50)
    What's the exact version of DG4ODBC you're using? 11.1.0.7?
    According to the listener file you're using DG4ODBC on Windows. There was a high/low byte issue in DG4ODBC for Windows. This issue is fixed in 11.1.0.7 and a certain patch. So I recommend you to get first the 11.1.0.7 patchset (if you don't already have it installed):
    6890831 Oracle Database Family: Patchset
    11.1.0.7.0 PATCH SET FOR ORACLE DATABASE SERVER 11.1.0.7.0
    and then please apply also the latest patch:
    8689191 Oracle Database Family: Patch
    ORACLE 11G 11.1.0.7 PATCH 16 BUG FOR WINDOWS 32 BIT 11.1.0.7.0
    There was a high/low byte issue
    Edited by: kgronau on Aug 11, 2009 10:28 AM

  • Connecting to MySQL via DW after Leopard install

    I cannot connect to MySQL 5.041 through DW CS3 after
    upgrading to Leopard. MySQL Admin and MySQL Query Browser both can
    connect and make queries to the database. I just can't connect
    through Dreamweaver. I get the "MySQL Error#: 2002" error which
    states "Can't connect to local MySQL server through socket
    '/var/mysql/mysql.sock' (2). Problem is there is no such
    path.

    There may be an updated needed for dreamweaver, however, I
    did find some info about MySQL running on Leopard:
    http://bugs.mysql.com/bug.php?id=32019
    and some workarounds that I have not tested as being valid:
    http://angry-fly.com/index.cfm/2007/10/26/Fix-for-MySQL-on-Leopard

  • Can Dreamweaver CS5 connect to MySQL via ODBC?

    I am unable to make a direct connection to an external MySQL database because most hosting provider does not allow this type of connection due to security reasons. I am however able to make an ODBC connection to the database (which I am currently using to connect filemaker to our MySQL database).
    How can I tell Dreamweaver CS5 to connect via the ODBC driver so I can see the MySQL content in my Dreamweaver project?
    I am on a Mac running OS X 10.6.4.

    GeorgeRudd wrote:
    How can I tell Dreamweaver CS5 to connect via the ODBC driver so I can see the MySQL content in my Dreamweaver project?
    You can't - at least not if you want to use Dreamweaver's server behaviors. Dreamweaver uses the original PHP MySQL extension. If you want to connect in any other way, you need to hand code everything yourself.
    On the other hand, if you want to see the contents of your remote database in Dreamweaver, define your remote server as the testing server. Dreamweaver uploads a hidden folder to the remote server to connect to the database. Because the script is on your remote server, it's local to the MySQL database, so gets round the security issue. It then sends the details to your local computer.
    A better solution, though, is to establish a local testing environment. It's more responsive and much more secure. http://www.adobe.com/devnet/dreamweaver/articles/setup_php.html.
    By the way, the failure to get a reply is due, in part, to posting your question in the wrong forum. The forum for issues related to PHP/MySQL and other server-side technologies is http://forums.adobe.com/community/dreamweaver/dreamweaver_development.

  • Problem connecting to Mysql using JDBC

    Hi Everyone,
    I am trying to connect Mysql ad java applet and I am using the Mysql jdbc connector.
    I Took the mysql-connector-java-5.0.8-bin.jar file and put that in the library of jdk.
    Now i used the following code to connect to the database using Netbeans.
    package testmysql;
    import java.sql.*;
    public class Main
    public static void main (String[] args)
    Connection conn = null;
    try
    String userName = "root";
    String password = "";
    String url = "jdbc:mysql://localhost/rpms";
    Class.forName ("com.mysql.jdbc.Driver").newInstance ();
    conn = DriverManager.getConnection (url, userName, password);
    System.out.println ("Database connection established");
    catch (Exception e)
    System.err.println ("Cannot connect to database server");
    finally
    if (conn != null)
    try
    conn.close ();
    System.out.println ("Database connection terminated");
    catch (Exception e) { /* ignore close errors */ }
    But it displays Cannot connect to database server
    thoughMysql server is running.
    Can anyone tell me wats the prob in this.
    thanks

    String url = "jdbc:mysql://localhost/rpms";
    Class.forName ("com.mysql.jdbc.Driver").newInstance ();
    Is rpms the MySQL database?
    Is the database on the default port 3306?
    Is the MySQL JDBC JAR file in the classpath of the applet?
    newInstance() is not required to be invoked unless using <= JDK 2.0
    Replace:
    catch (Exception e)
    System.err.println ("Cannot connect to database server");
    with:
    catch (Exception e)
    System.err.println (e.getMessage());
    Edited by: dvohra09 on Apr 10, 2009 10:54 PM
    Edited by: dvohra09 on Apr 10, 2009 10:55 PM
    Edited by: dvohra09 on Apr 10, 2009 10:58 PM

  • Connect to MySQL without JDBC

    Hello to everyone,
    Is there any way i can connect to a MySQL database without using JDBC? My web host does not support Java unless i go and buy a dedicated Server package which costs a small fortune so i am trying to find a work-around solution. Is there any way i can access a database by combining Java (locally) and PHP on server-side to get data out of the database and back to the Java piece of software?
    Thanks to everyone who might see or reply to this post

    Hello deeprave, thanks for replying so quick.
    So i guess this is not the best thing to do then. Please allow me to state my problem clearly . Maybe someone might have an answer to my issue. I want to be able to connect Java software on a web server. As deeprave correctly spotted, this can be done using Sockets. Indeed, i have my program connecting to the server.
    On my website, i ask users to register themselves in the user database (using standard PHP). Users are then able to log in their account and do stuff. This works fine through the browser.
    Issue is at the point where i want my Java software sitting locally on the users machine to be able to connect to the server and authenticate the user. If a user is not registered, the software wont be able to operate (or at least enable user do specific actions). If anyone has any ideas that might help i would be grateful if he/she shares them with me. I am approaching my deadline for submitting my 3rd ear project and i am a bit worried...
    Thanks a lot, and excuse me for the long question

  • Connecting to MySQL with JDBC in Reports

    Hi,
    I need help connecting to a MySQL db through oracle reports using a jdbc connection.
    I have downloaded the MySQL JDBC driver:mysql-connector-java-3.0.17-ga-bin.jar.
    I can succesfully use it to connect if I write a simple java program. So I know the driver works.
    I have set it in my classpath & edited the jdbcpds.conf file by adding the following:
    <driver name = "mysql-merant"
    sourceDatabase = "other"
    subProtocol = "mysql"
    connectString = "mainProtocol:subProtocol://databaseName"
    class = "com.mysql.jdbc.Driver"
    connection = "oracle.reports.plugin.datasource.jdbcpds.JDBCConnectionHandling">
    </driver>
    When I try to connect, I get the following error, ERR 62002 failed to connect to the data source.
    What do I have to do to connect? Is there a way to directly give the connect string?
    I can connect to an oracle DB using a the Oracle drivers no problem, why does forms not accept the MySQL driver? What can I do to make this work?
    Any help would be appreciated.
    Michael Baran
    [email protected]

    Michael,
    there is a Reports forum here on OTN as well. Posting your question there might be a better chance.
    Frank

  • Can connect to MySQL via localhost, but not remotely!

    Hi all!
    I got a problem that I think you guys could help me with :)..
    I have installed JDBC to make it possible to link my Java programs with MySQL databases. The installation worked just fine.
    When I'm running my program with line:
    Connection connection = null;
    connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/chat", "*****", "*****");...it works without any problems. I can handle information from the tables, add posts, delete posts and so on.
    But when I'm trying to connect from an another computer, from school for an example, it doesn't connect. JBDC says it can't fint the mysql jbdc driver.
    When I'm using this way I uses the line:
    Connection connection = null;
    connection = DriverManager.getConnection("jdbc:mysql://85.235.154.98:3306/chat", "*****", "*****");Like I said, this doesn't work at all.
    How do I fix this problem?
    Worth to mention maybe, is that I'm using Windows XP Home, and I have placed the mysql-connector-java-5.0.5-bin.jar in "C:\Program\Java\jre1.6.0_01\lib\ext"
    I'm using Java version 1.6.0!
    Please Help :)

    But when I'm trying to connect from an another
    computer, from school for an example, it doesn't
    connect. So the database is on your home computer? And you are attempting to connect from the school?
    JBDC says it can't fint the mysql jbdc
    driver.Then it has nothing to do with connecting. That means your class path is wrong.
    If it actually is a connection problem then you can do the following in a console window....
    telnet 85.235.154.98 3306
    There will be one of two results from the above after several minutes.
    1. It will just sit there.
    2. It will tell you it can't connect.
    For 2 you have a problem that has nothing to do with java. Looking at your code will not fix it.
    If it is 1 then something is wrong with your code and you should provide the exact exception.

  • Error connecting to mysql via ODBC

    Hi folks,
    I set up Oracle Database Gateway for ODBC with mysql driver (I tried mysql-connector-odbc-5.1.11-1.x86_64.rpm (currently used and log output shown) and mysql-connector-odbc-5.2.2-1.x86_64.rpm). I am unable to create a connection to the mysql database.
    Here are the parameters:
    Oracle database: 11gR2, AL32UTF8 , Suse SLES11 64 Bit
    Oracle Database Gateway for ODBC: installed on Suse SLES10, 64 Bit
    ODBC DSN: ona_nb
    initona_nb.ora in /opt/oracle/product/11.2.0/gtw_odbc/hs/admin:
    # 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=ona_nb
    HS_FDS_TRACE_LEVEL=255
    HS_FDS_SHAREABLE_NAME =/usr/lib64/libmyodbc5.so
    HS_LANGUAGE=AMERICAN_AMERICA.ISO8859P1
    #HS_TRANSACTION_MODEL=READ_ONLY
    #HS_FDS_SQLLEN_INTERPRETATION=32
    # ODBC specific environment variables
    set ODBCINI=/home/oracle/odbc/ona_nb-odbc.ini
    set ODBCINSTINI=/home/oracle/odbc/ona_nb-odbc.ini
    (I tried diffenet Language settings or no language setting at all, slightly different ..../hs/log trace files)
    ODBC file:
    ona_nb-odbc.ini :
    [ODBC Data Sources]
    ona_nb= MySQL ODBC Driver 5.2.2-1
    [ona_nb]
    Driver = /usr/lib64/libmyodbc5.so
    DATABASE = ona_default
    DESCRIPTION = MySQL Verbindung zur ona V11 Datenbank auf Christians Notebook
    PORT = 3306
    SERVER = cwolbert.gsi.de
    UID = oreader
    PWD = xxxxxx
    [ODBC]
    TRACEFILE = /tmp/mysql-odbc-ona_nb.trc
    TRACE = Yes
    ForceTrace = Yes
    set LD_LIBRARY_PATH=/usr/lib64:/opt/oracle/product/11.2.0/gtw_odbc/
    Listener.ora:
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /opt/oracle/product/11.2.0/dbhome_3)
    (PROGRAM = extproc)
    (SID_DESC =
    (GLOBAL_DBNAME = gridrep.gsi.de)
    (ORACLE_HOME = /opt/oracle/product/11.2.0/dbhome_3)
    (SID_NAME = gridrep)
    (SID_DESC=
    (SID_NAME=ona_nb)
    (ORACLE_HOME=/opt/oracle/product/11.2.0/gtw_odbc)
    (PROGRAM=dg4odbc)
    (ENVS=LD_LIBRARY_PATH=/usr/lib64:/opt/oracle/product/11.2.0/gtw_odbc/lib)
    Trying
    select * from locations@ona_nb
    whre ona_nb is the dblink
    CREATE DATABASE LINK "ONA_NB.GSI.DE"
    CONNECT TO OREADER
    IDENTIFIED BY <PWD>
    USING 'ona_nb';
    I get the error
    ORA-28511: RPC-Verbindung zu heterogenem Remote Agent mit SID=ORA-28511: RPC-Verbindung zu heterogenem Remote Agent mit SID=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=pcora11.gsi.de)(PORT=1521))(CONNECT_DATA=(SID=ona_nb))) abgebrochen abgebrochen
    ORA-02063: vorherige line von ONA_NB
    and here is the trace file from hs/log. I am unable to create any ODBC trace file, fiddling around with differnt settings
    Oracle Corporation --- FRIDAY NOV 23 2012 15:37:21.114
    Heterogeneous Agent Release
    11.2.0.1.0
    Oracle Corporation --- FRIDAY NOV 23 2012 15:37:21.113
    Version 11.2.0.1.0
    Entered hgogprd
    HOSGIP for "HS_FDS_TRACE_LEVEL" returned "255"
    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 "AL32UTF8"
    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 64 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 "ona_nb"
    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:ona_nb
    Exiting hgogprd, rc=0
    hostmstr: 0: HOA After hoagprd
    hostmstr: 0: HOA Before hoainit
    Entered hgoinit
    HOCXU_COMP_CSET=1
    HOCXU_DRV_CSET=873
    HOCXU_DRV_NCHAR=873
    HOCXU_DB_CSET=873
    HOCXU_SEM_VER=112000
    Entered hgolofn at 2012/11/23-15:37:21
    HOSGIP for "HS_FDS_SHAREABLE_NAME" returned "/usr/lib64/libmyodbc5.so"
    Entered hgolofns at 2012/11/23-15:37:21
    libname=/usr/lib64/libmyodbc5.so, funcname=SQLAllocHandle
    symbol_peflctx=0xaab3f456
    hoaerr:0
    Exiting hgolofns at 2012/11/23-15:37:21
    Entered hgolofns at 2012/11/23-15:37:21
    libname=/usr/lib64/libmyodbc5.so, funcname=SQLBindCol
    symbol_peflctx=0xaab44ce3
    hoaerr:0
    Exiting hgolofns at 2012/11/23-15:37:21
    Entered hgolofns at 2012/11/23-15:37:21
    libname=/usr/lib64/libmyodbc5.so, funcname=SQLBindParameter
    symbol_peflctx=0xaab4342c
    hoaerr:0
    Exiting hgolofns at 2012/11/23-15:37:21
    Entered hgolofns at 2012/11/23-15:37:21
    libname=/usr/lib64/libmyodbc5.so, funcname=SQLCancel
    symbol_peflctx=0xaab3e6e5
    hoaerr:0
    Exiting hgolofns at 2012/11/23-15:37:21
    Entered hgolofns at 2012/11/23-15:37:21
    libname=/usr/lib64/libmyodbc5.so, funcname=SQLDescribeParam
    symbol_peflctx=0xaab4346b
    .... many similar stuff
    Exiting hgolofns at 2012/11/23-15:37:21
    Entered hgolofns at 2012/11/23-15:37:21
    libname=/usr/lib64/libmyodbc5.so, funcname=SQLStatisticsW
    symbol_peflctx=0xaab477de
    hoaerr:0
    Exiting hgolofns at 2012/11/23-15:37:21
    Entered hgolofns at 2012/11/23-15:37:21
    libname=/usr/lib64/libmyodbc5.so, funcname=SQLTablesW
    symbol_peflctx=0xaab47a16
    hoaerr:0
    Exiting hgolofns at 2012/11/23-15:37:21
    Exiting hgolofn, rc=0 at 2012/11/23-15:37:21
    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 64 given for HS_FDS_SQLLEN_INTERPRETATION
    treat_SQLLEN_as_compiled = 1
    Exiting hgoinit, rc=0 at 2012/11/23-15:37:21
    hostmstr: 0: HOA After hoainit
    hostmstr: 0: HOA Before hoalgon
    Entered hgolgon at 2012/11/23-15:37:21
    reco:0, name:OREADER, tflag:0
    Entered hgosuec at 2012/11/23-15:37:21
    Exiting hgosuec, rc=0 at 2012/11/23-15:37:21
    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 OREADER as default value for "HS_FDS_DEFAULT_OWNER"
    HOSGIP for "HS_SQL_HANDLE_STMT_REUSE" returned "FALSE"
    Entered hgocont at 2012/11/23-15:37:21
    HS_FDS_CONNECT_INFO = "ona_nb"
    RC=-1 from HOSGIP for "HS_FDS_CONNECT_STRING"
    Entered hgogenconstr at 2012/11/23-15:37:21
    dsn:ona_nb, name:OREADER
    optn:
    Entered hgocip at 2012/11/23-15:37:21
    dsn:ona_nb
    Exiting hgocip, rc=0 at 2012/11/23-15:37:21
    ##>Connect Parameters (len=33)<##
    ## DSN=ona_nb;
    #! UID=OREADER;
    #! PWD=*
    Exiting hgogenconstr, rc=0 at 2012/11/23-15:37:21
    Entered hgopoer at 2012/11/23-15:37:21
    hgopoer, line 233: got native error 0 and sqlstate H; message follows...
    Exiting hgopoer, rc=0 at 2012/11/23-15:37:21
    hgocont, line 2752: calling SqlDriverConnect got sqlstate H
    Using no HS_LANGUAGE or HS_LANGUAGE=AMERICAN_AMERICA.AL32UTF8
    I still get the same error meassages and logs.
    Can you help please?
    Cheers Michael

    Hi Klaus,
    I think the unixODBC driver manager is installed
    I have:
    oracle@pcora11:/opt/oracle/product/11.2.0/gtw_odbc/hs/log> odbcinst -j
    unixODBC 2.2.11
    DRIVERS............: /etc/unixODBC/odbcinst.ini
    SYSTEM DATA SOURCES: /etc/unixODBC/odbc.ini
    USER DATA SOURCES..: /home/oracle/.odbc.ini
    and
    cat /etc/unixODBC/odbcinst.ini
    [MySQL ODBC 5.1 Driver]
    Driver = /usr/lib64/libmyodbc5.so
    UsageCount = 1
    but the two file for SYSTEM and USER DSN are empty.
    I tried now:
    HS_FDS_SHAREABLE_NAME =/usr/lib64/libodbc.so
    and
    HS_LANGUAGE=AMERICAN_AMERICA.WE8ISO8859P1
    and the result is still the same, what I posted in the prevoius answer to Mike,
    ORA-28500: Verbindung von ORACLE zu Fremdsystem gab diese Nachricht zur³ck:
    [unixODBC][MySQL][ODBC 5.1 Driver]Access denied for user
    'OREADER'@'pcora11.gsi.de' (using password: YES) {HY000,NativeErr = 1045}
    ORA-02063: vorherige 2 lines von ONA_NB
    and in the trace file:
    ##>Connect Parameters (len=33)<##
    ## DSN=ona_nb;
    #! UID=OREADER;
    #! PWD=*
    Exiting hgogenconstr, rc=0 at 2012/11/26-13:25:50
    Entered hgopoer at 2012/11/26-13:25:50
    hgopoer, line 233: got native error 1045 and sqlstate HY000; message follows...
    [unixODBC][MySQL][ODBC 5.1 Driver]Access denied for user 'OREADER'@'pcora11.gsi.de' (using password: YES) {HY000,NativeErr = 1045}
    Exiting hgopoer, rc=0 at 2012/11/26-13:25:50
    hgocont, line 2752: calling SqlDriverConnect got sqlstate HY000
    Exiting hgocont, rc=28500 at 2012/11/26-13:25:50 with error ptr FILE:hgocont.c LINE:2772 FUNCTION:hgocont() ID:Something other than invalid authorization
    Exiting hgolgon, rc=28500 at 2012/11/26-13:25:50 with error ptr FILE:hgolgon.c LINE:781 FUNCTION:hgolgon() ID:Calling hgocont
    hostmstr: 0: HOA After hoalgon
    RPC Calling nscontrol(0), rc=0
    hostmstr: 0: RPC Before Exit Agent
    hostmstr: 0: HOA Before hoaexit
    Entered hgoexit at 2012/11/26-13:25:50
    Exiting hgoexit, rc=0
    hostmstr: 0: HOA After hoaexit
    hostmstr: 0: RPC After Exit Agent
    Even if I copy the content of ona_nb-odbc.ini file to /etc/unixODBC/obc.ini
    I still get the same error.
    Any ideas?
    Michael

  • Opening Multiple DB Connections to MySQL via SSH Tunneling

    I'm connecting to a MySQL database through SSH.  Specifically I'm using PuTTY to establish a connection, and then tunnel the port through 3306.  Then I'm creating an ODBC Data source to my local 3306 port and using that datasource to open the connection in LabVIEW.
    I'm looking to run queries in parallel, and to do that, I believe I need to open up multiple connections.  Has anyone tried this before? Is there anyother way to do this?

    Hi Jonathan,
    I wasn't able to find too many resources on using multiple connections to a MySQL through SSH.  
    I was able to find this:
    http://digital.ni.com/public.nsf/allkb/C49602A79827DDBE86256CE9005757D5
    that might give you some more information.
    I would try to open up multiple connections if the database supports it and try it that way.
    If you have any troulbe with that route, feel free to let us know.
    Sincerely,
    Bogdan Buricea
    Applications Engineering
    National Instruments
    Bogdan Buricea
    Applications Engineer
    National Instruments

  • Trying to connect to database via jdbc

    I'm tring to connect to a mimer database currently running on my computer. This is what I've done in main:
    Connection con;
    try{
                   Class.forName("com.mimer.jdbc.Driver");
                   String url = "jdbc:mimer://sysadm:frenulum@C:/Skola/Examensarbete/Testbasen";
                   con = DriverManager.getConnection(url);
              catch(Exception e){
                   System.out.println(e);
              }I have included drivers and all that. The Exception I get is:
    java.sql.SQLException: Illegal port: , java.lang.NumberFormatException: For input string: ""
    Does anyone know what's wrong?

    I'm tring to connect to a mimer database currently
    running on my computer. This is what I've done in
    main:
    Connection con;
    try{
                   Class.forName("com.mimer.jdbc.Driver");
    String url =
    l =
    "jdbc:mimer://sysadm:frenulum@C:/Skola/Examensarbete/T
    estbasen";
                   con = DriverManager.getConnection(url);
              catch(Exception e){
                   System.out.println(e);
              }I have included drivers and all that. The Exception I
    get is:
    java.sql.SQLException: Illegal port: ,
    java.lang.NumberFormatException: For input string:
    Does anyone know what's wrong?Your url is probably wrong. The exception says that you haven't specified the port number.
    /Kaj

  • Problem connecting to MySQL thro Applet using JDBC

    Hi,
    I'm trying to use an applet to connect to MySQL thro JDBC. The applet, the IE client that loads the HTML, and MySQL all reside on the same machine. But I'm getting the following error:"ClassNotFoundException: com.mysql.jdbc.Driver". But I'm able to connect using a Java application and run and display SQL query results. Any ideas are highly appreciated. Here're are the two pieces of code:
    /****** Java Application *****/
    import java.sql.*;
    public class MySQL_App {
    public static void main(String args[]) {
              String url = "jdbc:mysql://localhost/test";
         try {
                   Class.forName("com.mysql.jdbc.Driver");
         catch(java.lang.ClassNotFoundException e) {
                   System.err.print("ClassNotFoundException: ");
                   System.err.println(e.getMessage());
    /****** Java Applet *****/
    import java.awt.*;
    import javax.swing.*;
    import netscape.javascript.*;
    import java.sql.*;
    public class MySQL_Applet extends JApplet {
         JSObject win;
         public void init() {
              win = JSObject.getWindow(this);
         public void callShowMessage() {
              String url = "jdbc:mysql://" + this.getDocumentBase().getHost() + "/test";
              String[] args = new String[1];
         args[0] = "" ;
         try {
              Class.forName("com.mysql.jdbc.Driver");
         catch(java.lang.ClassNotFoundException e) {
                   args[0] += "ClassNotFoundException " + e.getMessage() ;
         win.call("showMessage", args);
    }

    mmm i, think that may here we've 2 possibles answers:
    1) Did u read about "Applet Security"? my point is that you haven't acces to your local var "path" or "classpath".
    2) Maybe u didn't especificate the MySQl path in ur classpath;
    Check this 2 points

  • Connect to MySQL

    How can I create connection between mySQL and JDBC directly without ODBC. Does JDBC provide built-in mySQL driver ?
    Thank you very much

    yes. There is a type4 jdbc driver for mySql databases. It usually comes alongwith jdbc1.0 and 2.0 versions in a compressed file calles mysql_2_comp.jar. Or, you can download it from this site:
    http://www.worldserver.com/mm.mysql/
    This driver is also known as "mm driver".
    Amit.

  • Accessing Data from HTML DB via JDBC

    Hello, I am from Germany so please excuse my following mistakes in english.
    I built a web-application based on JSP, which connects to a local oracle-database 10g. web-server is tomcat. I use the JDBC-Driver from Oracle.
    Now I want to connect not to my local db but to a Oracle HTML DB, which already exists in the domain of my company. I know the workspace, the application-name and everything, which is accessible for an HTML DB admin. but no clue, what's important for connecting the database via JDBC.
    The hostname I got from the URL of HTML DB as well as the port. The main problem is to get the right database-name. I tried the workspace-name -> nothing, tried the application-name -> nothing. Honestly I tried everything, what I found.
    So my questions :
    -> Is there a chance to access the data created and used in the workspaces of the HTML-DB via JDBC (Java Database Connectivity)?
    -> How do I name the Workspace from outside?
    -> Are the login-accounts still applicable when connecting from outside via JDBC?
    I'm looking forward to get your ideas and help
    So far
    Kay

    Your English is very good. The hostname on the URL of HTML DB may not be the host on which the database rests. That is the host of the HTTP server. That server may or may not be the database server.
    Now your questions:
    -> Is there a chance to access the data created and used in the workspaces of the HTML-DB via JDBC (Java Database Connectivity)? What do you mean by "Data created and used in the workspace"? Do you mean the HTML DB repository which contains the application, page, and item definitions? (This is accessible via the schema that HTML DB was installed in.) If you mean the data a user creates when using an HTML DB application, then it is accessible through the application's parsing schema.
    -> How do I name the Workspace from outside? Outside the realm of HTML DB the workspace is not needed.
    -> Are the login-accounts still applicable when connecting from outside via JDBC? When you say "login-accounts" doe the mean the username/password users used to run the HTML DB application? These may or may not be database schemas. They may be HTML DB usernames or network usernames or LDAP usernames.
    I highly recommend you contact the DBA of the database you are trying to connect to and explain what you are doing. You should also contact the developer of the HTML DB application. They should be able to provide you with all the information you need.
    Mike

Maybe you are looking for

  • Hitachi, Seagate or Toshiba 100GB 7200RPM Hard Drives?

    Hey all I'm considering upgrading the Hard Drive on my powerbook. but im stuck with choices. I Know Hitachi is the fastest out there but it's also the noiseiest as i've heard. The Seagate i hear is quiter but not as fast as the Hitachi and the Toshib

  • How to use pci-6230 as position measure

    Can i use the following method to realiate position measure function? *  gpct_ex7.cpp *  Quadrature encoding *  Read a quadrature encoder using counter 0.  The counter is configured for X4 mode *  The initial value is loaded into the counter from the

  • Problem in accessing the database through VPN

    I am having problem connecting to the database through VPN but it is working perfectly fine if i connect to the network directly. It would be really great if you could help me to resolve this issue. Thanks

  • Photoshop CS5 and 64 bit

    I'm confused, can CS5 run in Leopard at 64 bit or do you have to go to Snow Leopard?

  • Coding in Update Rules

    Hi, I need generate the report from the following two cubes, Multiprovider does not provide the solution. Here is the two cubes, CUBE 1 - 0CATS_C01 - Time sheets Approved 0NETWORK Network 0R_ACTIVITY Activity Number CUBE 2 - 0PS_C04 Project Systems 0