Connect Mysql in Flex Using VB

Hai All,
    Could any one tell me how to connect Mysql in flex using vb. I tried, but i am getting the below error.How to import mysql class.
Compiler Error Message: BC30002: Type  'MySql.Data.MySqlClient.MySqlConnection' is not defined.
Source  Error:
Line 5: 
Line 6:  Public Class Database
Line 7:      Public DBConnection As MySql.Data.MySqlClient.MySqlConnection
Line 8: 
Line 9:      Public Function DBNAME() As String
And i want to convert the text to voice, how to do this?? Any idea .. please help me
Thanks and Regards,
Arun Kumar

System.err.println("Exception: " + e.getMessage());You should do something more useful instead, like e.printStackTrace(). THe message of an exception doesn't always say very much.
You are probably getting a "class not found exception" signaling that the class com.mysql.jdbc.Driver cannot be found --- you need to somehow make JCreator aware of the JDBC driver.

Similar Messages

  • Oracle to connect MySQL

    Dear All,
    from couple of days I am trying to connect mysql from my oracle database.
    I have studied so many documentations and have created one of my own. I am just struck at one point.
    My oracle database is 11gR1 and CentOS 5.1 32-bit is the operating system.
    MySQL is on a windows based machine and version is 5.1.
    What I can do:
    I can connect MySQL from Linux using the command: isql –v bssdata <user> <password> [Connected]
    I can tnsping the listener using command: tnsping bssdata [OK]
    But after setting up what i did in the documentation below when I try to connect mysql using a DB link. It gives the following error:
    select * from bssdata.sta_mis_std_marks@bssdata
    Error at Command Line:1 Column:40
    Error report:
    SQL Error: ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    ORA-02063: preceding line from BSSDATA
    28500. 00000 - "connection from ORACLE to a non-Oracle system returned this message:"
    *Cause:    The cause is explained in the forwarded message.
    *Action:   See the non-Oracle system's documentation of the forwarded
    message.
    Please help me get out of this. Thank you very much
    Here are the details what i did:
    Install required packages
    Yum install mysql-connector-odbc
    Yum install unixODBC
    vi /etc/odbc.ini
    [bssdata]
    # myodbc3 = MySQL ODBC 3.51 Driver DSN
    # [myodbc3]
    Driver = /usr/lib/libmyodbc3.so
    Description = MySQL ODBC 3.51 Driver DSN
    SERVER = 192.168.0.68
    PORT = 3306
    USER = ******
    Password = ******
    Database = bssdata
    OPTION = 3
    SOCKET =
    vi /etc/odbcinst.ini
    # Example driver definitinions
    # Included in the unixODBC package
    #[PostgreSQL]
    #Description = ODBC for PostgreSQL
    #Driver = /usr/lib/libodbcpsql.so
    #Setup = /usr/lib/libodbcpsqlS.so
    #FileUsage = 1
    # Driver from the MyODBC package
    # Setup from the unixODBC package
    [MySQL]
    Description = ODBC for MySQL
    Driver = /usr/lib/libmyodbc3.so
    Setup = /usr/lib/libodbcmyS.so
    FileUsage = 1
    Test Connection
    isql –v bssdata ****** ******
    Editing listener.ora file to add entry
    # listener.ora Network Configuration File: /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
    # Generated by Oracle configuration tools.
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = blissglb.abc.edu.pk)(PORT = 1521))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /u01/app/oracle/product/11.1.0/db_1)
    (PROGRAM = extproc)
    (SID_DESC =
    (PROGRAM = dg4odbc)
    (ORACLE_HOME = /u01/app/oracle/product/11.1.0/db_1)
    (SID_NAME = bssdata)
    (ENVS=LD_LIBRARY_PATH = /usr/local/lib:/u01/app/oracle/product/11.1.0/db_1/odbc)
    Restart listener
    Lsnrctl> stop
    Lsnrctl> start
    Test listener
    tnsping bssdata
    Editing tnsnames.ora file in network directory of oracle
    # tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.1.0/db_1/network/admin/tnsnames.ora
    # Generated by Oracle configuration tools.
    BLISSGLB =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = blissglb.abc.pk)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = blissglb.abc.edu.pk)
    BSSGLB, BSSGLB.abc.EDU.PK =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.24)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = bssglb.abc.edu.pk)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
         (ADDRESS_LIST =
              (ADDRESS =
                   (PROTOCOL = IPC)
                   (KEY = EXTPROC1521)
         (CONNECT_DATA =
              (SID = PLSExtProc)
              (PRESENTATION = RO)
    bssdata =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.66)(PORT = 1521))
    (CONNECT_DATA =
    (SID = bssdata)
    (HS = OK)
    Edit Oracle’s bash_profile
    # .bash_profile
    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
    . ~/.bashrc
    fi
    # User specific environment and startup programs
    ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
    export ORACLE_HOME
    ORACLE_SID=blissglb
    export ORACLE_SID
    ORACLE_BASE=/u01/app/oracle
    export ORACLE_BASE
    LD_LIBRARY_PATH=/usr/local/lib:/u01/app/oracle/product/11.1.0/db_1/lib
    export LD_LIBRARY_PATH
    ODBCINI=/etc/odbc.ini
    export ODBCINI
    ODBCSYSINI=/etc
    export ODBCSYSINI
    PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
    export PATH
    unset USERNAME
    Configure file db_1/hs/admin/inithsodbc.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 = <odbc data_source_name>
    #HS_FDS_TRACE_LEVEL = <trace_level>
    #HS_FDS_SHAREABLE_NAME = <full path name of odbc driver manager or driver>
    HS_FDS_CONNECT_INFO = bssdata
    HS_FDS_TRACE_LEVEL = off
    HS_FDS_SHAREABLE_NAME = /usr/lib/libmyodbc3.so
    # ODBC specific environment variables
    #set ODBCINI=<full path name of the odbc initilization file>
    set ODBCINI=/etc/odbc.ini
    # Environment variables required for the non-Oracle system
    set <envvar>=<value>
    Create Database Link
    Create database link bssdata connect to ****** identified by ******** using ‘bssdata’
    Using selection query
    Select * from bssdata.sta_mis_std_marks@bssdata {Here comes the error described above}
    Regards,
    Imran

    Hi ,
    i am facing the same issue.
    These are my findings at this moment.
    By looking at http://www.pythian.com/news/1554/how-to-access-mysql-from-oracle-with-odbc-and-sql/ we can see that :
    "Connector ODBC 5.1. The Oracle Gateway for ODBC checks/relies on some features, such as the ODBC descriptor, that are not available in 3.51. You can check the associated documentation and bug 32692 for some details about SQLSetDescRec"
    So we have a bug related to SQLSetDescRec missing from the libmyodbc3.so library.
    We can check this as follows :
    [oracle@log]$ nm -D /usr/lib64/libmyodbc3.so | fgrep SQLMoreResults
    0000000000017c70 T SQLMoreResults
    [oracle@log]$ nm -D /usr/lib64/libmyodbc3.so | fgrep SQLSetEnvAttr
    0000000000016c40 T SQLSetEnvAttr
    [oracle@log]$ nm -D /usr/lib64/libmyodbc3.so | fgrep SQLSetDescRec
    No output for SQLSetDescRec.
    Now i have to see how can i get over this bug.
    Regards,
    George

  • How to connect mysql database using xml

    welcome to all,
    here my doubt is how to connect mysql database using xml file, how to integrate xml file and jsp file and how to access data from dabase using jsp file. can any one help me
    regards

    Short answer: you wouldn't do any of those things. The first two are meaningless and the third is a bad practice. I have no idea what those ideas were supposed to achieve so I have no idea what tutorials I should suggest to you.

  • How do i create a styled spry mysql driven menu using dreamweaver cs4?

    How do i create a styled spry mysql driven menu using dreamweaver cs4?
    I have cs4. I gave up on using MS sql as a datasource. I finally got a php successfull connection in my PHP web page.
    I would like a nice video tutorial for creating a dynamic menu.
    I guess i can style it by attaching a css file to the page. Are their any already designed css files out there in some online area?
    i am not a good designer. so i would like to simply have a collection of menu_style.css files and choose what looks good.
    But first i need to build the spry menu from the mysql database.
    Any help is apprechiated.
    My first choice was to maintain the data in an MS sql server file. If i could directly attach to an ms sql datasource then that would be the best option.
    I dont think i want to have to re-generate an XML datasource each time i add or modify the menu. I would like to maintain the MS Sql or mySql file instead.
    If i could generate an XML datasource from the MS Sql database then I may even prefere that, but i have spent a lot of time trying to figure out how to do that and not had any success. So i prefere working in MS sql but would settle for mySql if i had to.
    Thanks
    Jerry

    To create a dynamic menu take a look here http://labs.adobe.com/technologies/spry/samples/menubar/MenuFromNestedData.html#
    The XML file for the above menu looks like this
    <?xml version="1.0" encoding="utf-8"?>
    <items>
         <item id="0001" type="donut">
              <name>Cake</name>
              <ppu>0.55</ppu>
              <batters>
                   <batter id="1001">Regular</batter>
                   <batter id="1002">Chocolate</batter>
                   <batter id="1003">Blueberry</batter>
                   <batter id="1003">Devil's Food</batter>
              </batters>
              <topping id="5001">None</topping>
              <topping id="5002">Glazed</topping>
              <topping id="5005">Sugar</topping>
              <topping id="5007">Powdered Sugar</topping>
              <topping id="5006">Chocolate with Sprinkles</topping>
              <topping id="5003">Chocolate</topping>
              <topping id="5004">Maple</topping>
         </item>
         <item id="0002" type="donut">
              <name>Raised</name>
              <ppu>0.55</ppu>
              <batters>
                   <batter id="1001">Regular</batter>
              </batters>
              <topping id="5001">None</topping>
              <topping id="5002">Glazed</topping>
              <topping id="5005">Sugar</topping>
              <topping id="5003">Chocolate</topping>
              <topping id="5004">Maple</topping>
         </item>
         <item id="0003" type="donut">
              <name>Buttermilk</name>
              <ppu>0.55</ppu>
              <batters>
                   <batter id="1001">Regular</batter>
                   <batter id="1002">Chocolate</batter>
              </batters>
         </item>
         <item id="0004" type="bar">
              <name>Bar</name>
              <ppu>0.75</ppu>
              <batters>
                   <batter id="1001">Regular</batter>
              </batters>
              <topping id="5003">Chocolate</topping>
              <topping id="5004">Maple</topping>
              <fillings>
                   <filling id="7001">
                        <name>None</name>
                        <addcost>0</addcost>
                   </filling>
                   <filling id="7002">
                        <name>Custard</name>
                        <addcost>0.25</addcost>
                   </filling>
                   <filling id="7003">
                        <name>Whipped Cream</name>
                        <addcost>0.25</addcost>
                   </filling>
              </fillings>
         </item>
         <item id="0005" type="twist">
              <name>Twist</name>
              <ppu>0.65</ppu>
              <batters>
                   <batter id="1001">Regular</batter>
              </batters>
              <topping id="5002">Glazed</topping>
              <topping id="5005">Sugar</topping>
         </item>
         <item id="0006" type="filled">
              <name>Filled</name>
              <ppu>0.75</ppu>
              <batters>
                   <batter id="1001">Regular</batter>
              </batters>
              <topping id="5002">Glazed</topping>
              <topping id="5007">Powdered Sugar</topping>
              <topping id="5003">Chocolate</topping>
              <topping id="5004">Maple</topping>
              <fillings>
                   <filling id="7002">
                        <name>Custard</name>
                        <addcost>0</addcost>
                   </filling>
                   <filling id="7003">
                        <name>Whipped Cream</name>
                        <addcost>0</addcost>
                   </filling>
                   <filling id="7004">
                        <name>Strawberry Jelly</name>
                        <addcost>0</addcost>
                   </filling>
                   <filling id="7005">
                        <name>Rasberry Jelly</name>
                        <addcost>0</addcost>
                   </filling>
              </fillings>
         </item>
    </items>
    Then remains the manner in which you create the XML file which can be found here http://labs.adobe.com/technologies/spry/samples/utils/query2xml.html
    One you have your menu up and running, you will be able to apply styles and effects

  • Issues in mapping objects from java to flex - using flex4

    Hi,
    I have a class in java which i want to send to flex4 using BlazeDS as middleware. There are a few issues that i am facing and they are:
    When sending the object across (java to flex), the properties with boolean data type having value as true gets converted to properties with value as  false. Even after setting the value to true it still comes as false on flex side. Can't understand why this is happening.
    When sending the list of object containing property with boolean data type, the object on flex side does not show those properties at all. As of there were no boolean properties in that object.
    Last but not the least, When sending List<ContractFilterVO> contractFilterVOs to flex using remote call, the result typecasted to ArrayCollection does not show the holding objects as ContractFilterVOs but as plain default Object though having all the properties send, except the boolean one mentioned in above points. Basically it is not able to typecast the objects in arraycoolection but the same objects gets typecasted when sent individually.
    In all the above points i am using Remote Service through BlazeDS for connectivity with Java. I have done a lot of this stuff in Flex 3 but doing it for the first time in flex 4, is there anything that Flex 4 needs specific. Below is the pasted code for reference purpose.
    Flex Object
    package com.vo
         [RemoteClass(alias="com.vo.ContractFilterVO")]
    public class ContractFilterVO{
         public function ContractFilterVO(){
         public var contractCode:String;
         public var contractDescription:String;
         public var isIndexation:Boolean;
         public var isAdditional:Boolean;
    * Rmote Part of code
    var remoteObject:RemoteObject = new RemoteObject();
    remoteObject.destination="testService";
    remoteObject.addEventListener(ResultEvent.Result,handleResult);
    public function handleResult(event:ResultEvent):void{
         var contarctFilterVOs:ArrayCollection = event.result as ArrayCollection; //Point 2&3 probelem, if list sent form java
         var contarctFilterVO:ContractFilterVO= event.result as ContractFilterVO; //Point 1 probelem, if only single Object of type ContractFilterVO sent form java
    Java Object
    package com.vo
    public class ContractFilterVO implements Serializable 
         public function ContractFilterVO(){
         private static final long serialVersionUID = 8067201720546217193L;
         private String contractCode;
         private String contractDescription;
         private Boolean isIndexation;
         private Boolean isAdditional;
    I don't understand what is wron in my code on either side, it looks syntactically right. It would be great anyone could help me point out my mistake here. Waiting for right solutions...
    Thanks and Regards,
    Jigar

    Hi Jeffery,
    Thanks for your reply, it did solve my query @ point 3 as well as point 2 where the objects in arraycollection were not geting converted and boolean properties did not appear when list of an objects were received. And hey, i did have public functions for properties defined java class, just forgot to mention here in post, sorry for that.
    The solution you gave was right, but than what if i have a VO which has multiple List of objects coming from Java, than i would have to create an instance of each type of object on flex side this is too tedious, is'nt it? Is there any better solution... out there.
    And jeffery do you some tricks up your sleeve for this Boolean issues to that i am facing in point 1... Still struggling with this one...
    Anyone out there would be more than welcome to point my mistake, if any and provide tips/tricks or solutions...
    Thanks again to Jeffery...
    Waiting for more solutions sooner...
    thanks and Regards,
    Jigar

  • ORA-28500 and ORA-02063 while connecting MySQL from Oracle-

    Dear All,
    My Database is Oracle 11gR2 Rac of 2 nodes and on Linux 64-Bit operating system.
    Version of my MySQL database is 5.5.17 it is on Linux 32-Bit operating system.
    I am trying to connect MySQL database from Oracle database using a database link.
    These are the step by step process that I am following to achieve my target. All my processes are on one node of Oracle RAC.
    1)
    Yum install mysql-connector-odbc
    Yum install unixODBC
    2)
    Edit file /etc/odbc.ini
    [test]
    Driver = /usr/lib64/libmyodbc3.so
    Description = MySQL ODBC 3.51 Driver DSN
    SERVER = 10.0.0.1
    PORT = 3306
    USER = test
    Password = test
    Database = test
    OPTION = 3
    SOCKET =
    3)
    Edit file /etc/odbcinst.ini
    [MySQL]
    Description = ODBC for MySQL
    Driver = /usr/lib64/libmyodbc3.so
    Setup = /usr/lib64/libodbcmyS.so
    FileUsage = 1
    4) test connection
    isql –v test test test
    Returns:
    | Connected! |
    | |
    | sql-statement |
    | help [tablename] |
    | quit |
    | |
    SQL>
    5) Now I edit listener.ora file and add the entry. After entry my listener.ora file is like this:
    LISTENER =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    (ADDRESS = (PROTOCOL = IPC)(KEY = LISTENER))
    (ADDRESS = (PROTOCOL = TCP)(HOST=testnode1)(PORT = 1521))
    # line added by Agent
    LISTENER_SCAN1 =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = LISTENER_SCAN1))
    # line added by Agent
    ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1 = ON # line added by Agent
    ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER = ON # line added by Agent
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
    (PROGRAM = extproc)
    (SID_DESC =
    (PROGRAM = dg4odbc)
    (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
    (SID_NAME = test)
    (ENVS=LD_LIBRARY_PATH = /usr/local/lib:/u01/app/oracle/product/11.2.0/dbhome_1/lib)
    6) After these entries the listener status after RESTART is as following:
    LSNRCTL> status
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
    Start Date 27-DEC-2011 01:19:32
    Uptime 0 days 9 hr. 31 min. 12 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora
    Listener Log File /u01/app/grid/diag/tnslsnr/racnode1/listener/alert/log.xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=testnode1)(PORT=1521)))
    Services Summary...
    Service "+ASM" has 1 instance(s).
    Instance "+ASM1", status READY, has 1 handler(s) for this service...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "test" has 1 instance(s).
    Instance "test", status UNKNOWN, has 1 handler(s) for this service...
    Service "testdb" has 1 instance(s).
    Instance "testdb1", status READY, has 1 handler(s) for this service...
    Service "racdbXDB" has 1 instance(s).
    Instance "testdb1", status READY, has 1 handler(s) for this service...
    The command completed successfully
    7) Then in the tnsnames.ora file I added the following entry:
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS =
    (PROTOCOL = IPC)
    (KEY = EXTPROC1521)
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    test =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.0.1)(PORT = 1521))
    (CONNECT_DATA =
    (SID = test)
    (HS = OK)
    When i tnsping test, it works.
    8) I edit the .bash_profile file for Oracle
    ORACLE_HOME, ORACLE_BASE were already pointing to the correct destination, I added:
    LD_LIBRARY_PATH=/usr/local/lib:/u01/app/oracle/product/11.1.0/db_1/lib:/u01/app/oracle/product/11.2.0/dbhome_1/hs/lib:/usr/lib64:/usr/lib
    export LD_LIBRARY_PATH
    ODBCINI=/etc/odbc.ini
    export ODBCINI
    ODBCINSTINI=/etc/odbc.ini
    export ODBCINSTINI
    ODBCSYSINI=/etc
    export ODBCSYSINI
    9) Then i configured $ORACLE_HOME/hs/admin/inithsodbc.ora
    And Modified these lines:
    HS_FDS_CONNECT_INFO = test
    HS_FDS_TRACE_LEVEL = ON
    HS_FDS_TRACE_FILE_NAME = odbc_test.log
    HS_FDS_TRACE_LEVEL = 4
    HS_FDS_SHAREABLE_NAME = /usr/lib64/libodbc.so
    HS_FDS_SUPPORT_STATISCTICS = FALSE
    HS_LANGUAGE = AMERICAN_AMERICA.WE8ISO8859P1
    set ODBCINI = /etc/odbc.ini
    10) Then i created a database link with the following command:
    Create public database link test connect to test identified by test using ‘test’;
    I tried username and password in database link with double quotes also.
    11) Now Finally when I try to select records from mysql table:
    select count(*) from "table"@"test"; -- I have tried with and without double quotes
    I get the following error:
    ERROR at line 1:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    ORA-02063: preceding line from TEST
    How to get through this error, and how to check logs for HS?
    Your help is required.
    Regards, Imran
    Edited by: misterimran on Dec 27, 2011 1:21 PM

    Hi,
    In your listener.ora for the DG4ODBC entry you had -
    (ENVS=LD_LIBRARY_PATH = /usr/local/lib:/u01/app/oracle/product/11.2.0/dbhome_1/lib)
    but this should also include the path for the driver manager directory which in your case is /usr/lib64 so could you add this ?
    The error -
    Failed to load ODBC library symbol: /usr/lib64/libmyodbc3.so(SQLSetDescRec)
    indicates the /usr/lib64 directory cannot be accessed.
    The entry should then look like -
    (SID_DESC =
    <space>(PROGRAM = dg4odbc)
    <space>(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
    <space>(SID_NAME = test)
    <space>(ENVS=LD_LIBRARY_PATH = /usr/local/lib:/usr/lib64:/u01/app/oracle/product/11.2.0/dbhome_1/lib)
    <space>)
    The spaces may have bene lost when posting but there should be at least one space in the file as indicated by the <space>.
    After making the change then stop and start the listener.
    If you still have problems then please post again the current versions of the configuration files, the full errors shown in SQLPLUS for a select and the output from a debug trace showing the errors.
    The information shows you are using the 3.51 MySQL ODBC driver so could you also try with the latest version of the 5.1 driver and see if you have the same problem ?
    Regards,
    Mike

  • How to connect mysql to my palm devices?

    hi, need help on how to connect mysql to my palm devices? is there anyone know to do connect mysql to palm devices using wireless toolkit?
    thanks

    Midlet:
    os.writeUTF(db.trim());
    os.writeUTF("\r\n");
    os.writeUTF(user.trim());
    os.writeUTF("\r\n");
    os.writeUTF(pwd.trim());Servlet:
    String db = in.readLine();
    String user = in.readLine();
    String pwd = in.readLine();If it works, that's just luck, but it's completely wron.! Why? Read the api doc's of DataOutputStream!

  • Quering MySql DB tables using DB adapter in Oracle SOA

    Hi',
    I am trying to query MySql DB tables using DB adapter in Oracle SOA.
    inside the weblogic server console I have created a data source and test is "success" MySql
    Now inside the deployments > DBAdapter > Configuration > outbound connection pools
    I am new outbound connection, however I only get one option by default "javax.resource.cci.ConnectionFactory".
    which is default pointing to oracle DB.
    If someone has implemented this earlier or some blog/document demonstrates this please let me know.
    Thanks
    Yatan

    Thanks Naresh,
    actually I tried changing the "platformClassName" to "oracle.toplink.platform.database.MySQL4Platform" in the existing connection factory.
    I am able to update the DBAdapter successfully, however when I try to run the service created in JDEV which uses this MySql DB table it gives me below error.
    I also have another doubt regarding "How can we create a new connection factory in weblogic console?"
    ERROR:
    The selected operation process could not be invoked.
    An exception occured while invoking the webservice operation. Please see logs for more details.
    oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: Exception occured when binding was invoked.
    Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'insert' failed due to: Could not create/access the TopLink Session.
    This session is used to connect to the datastore.
    Caused by Exception [EclipseLink-7042] (Eclipse Persistence Services - 2.1.3.v20110304-r9073): org.eclipse.persistence.exceptions.ValidationException
    *Exception Description: Database platform class [org.eclipse.persistence.platform.database.MySQL4Platform] not found.*
    Internal Exception: Exception [EclipseLink-3007] (Eclipse Persistence Services - 2.1.3.v20110304-r9073): org.eclipse.persistence.exceptions.ConversionException
    Exception Description: The object [org.eclipse.persistence.platform.database.MySQL4Platform], of class [class java.lang.String], could not be converted to [class java.lang.Class]. Ensure that the class [org.eclipse.persistence.platform.database.MySQL4Platform] is on the CLASSPATH. You may need to use alternate API passing in the appropriate class loader as required, or setting it on the default ConversionManager
    Internal Exception: oracle.classloader.util.AnnotatedClassNotFoundException:
    Missing class: org.eclipse.persistence.platform.database.MySQL4Platform
    Dependent class: org.eclipse.persistence.internal.helper.ConversionManager
    Loader: sun.misc.Launcher$AppClassLoader@13288040
    Code-Source: /C:/Oracle/MiddlewarePS4/modules/org.eclipse.persistence_1.1.0.0_2-1.jar
    Configuration: /C:/Oracle/MiddlewarePS4/modules/org.eclipse.persistence_1.1.0.0_2-1.jar
    This load was initiated at default.composite.MySqlTest.soa_2c170363-5ad7-4578-8920-f30fb224a8d2:1.0 using the Class.forName() method.
    You may need to configure the connection settings in the deployment descriptor (i.e. DbAdapter.rar#META-INF/weblogic-ra.xml) and restart the server. This exception is considered not retriable, likely due to a modelling mistake.
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.

  • How to Connect MySQL Database Through JTable?

    Hi,
    How to Connect MySQL Database Through JTable? anyone of u knows these concept please send me coding of that Part..
    Thanks,
    Guru..

    Start by reading the tutorials. There's a section on Swing which shows you how to use tables and a section on JDBC which shows you how to use SQL.
    And you can always search the forum as well since there are working examples of both posted on the forum.
    If you need further help with a specific problem then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.
    Don't forget to use the [Code Formatting Tags|http://forum.java.sun.com/help.jspa?sec=formatting], so the posted code retains its original formatting.

  • MySQL DB file using java

    Is there a way of creating a mySQL database file using java, a file similar to MS Access file?

    I recall a software that save files in .mysql format.
    Didn't know how these files were generated, but I am
    sure of the extension.Well that's swell.
    There is no such file used by MySQL. Further MySQL databases are not contained in a file but in fact use several files and are tied directly to tables. For each table you will have two files, one with structure and one with the data. Then for each index you will have another file.
    That's for MyISAM tables anyway (a MySQL variant of ISAM). For other table engine types it varies but multiple files per table is a common thread.
    The file you are talking about most likely contains SQL queries and is a SQL batch program for creating and populating a database.
    Anyway on to trying to actually resolve your issue. Creating ISAM files from scratch is a no-go to create a database. You can of course always connect to the database engine and issue queries like "CREATE DATABASE" or "CREATE TABLE"
    What is the actual problem you are trying to solve here?

  • MySQL/JDBC.  Use socket /tmp/mysql.sock NOT TCP/IP?

    Does anybody know how to use the MySQL connector to use the file /tmp/mysql.sock to connect to MySQL locally? I can't find it in the docs. I currently don't have it running on any TCP/IP ports and figured there must be a way to use MySQL with Java without needing TCP/IP.
    Cheers,
    d11

    Because the .sock file isa unix domain socket. This is normally not available on other OS's. So, the sock is platform dependent, and Java, at least usually, does not support strictly platform dependent features, you can not use it (at least not using the standard API's). If you search, real hard, you may find some hacks to do so, but they are exactly that, hacks.

  • Connect Mysql And Eclipse c++

    i trying to connect mysql database and eclipse c++ and i set everything but when i want to compile a program using data base this error massage appears:
    "fatal error:boost/shared_ptr.hpp: no such file or directory"
    how can i fix it, there is no solution on the internet, and i really really really tired of searching about this.
    my compiler: gcc
    my os: windows 8.1
    here you can see my code:
    #include <stdlib.h>
    #include <iostream>
    #include "mysql_connection.h"
    #include <cppconn/driver.h>
    #include <cppconn/exception.h>
    #include <cppconn/resultset.h>
    #include <cppconn/statement.h>
    #include <cppconn/prepared_statement.h>
    using namespace std;
    int main(void)
    cout << endl;
    cout << "Let's have MySQL count from 10 to 1..." << endl;
    try {
    sql::Driver *driver;
    sql::Connection *con;
    sql::Statement *stmt;
    sql::ResultSet *res;
    sql::PreparedStatement *pstmt;
    /* Create a connection */
    driver = get_driver_instance();
    con = driver->connect("tcp://127.0.0.1:3306", "root", "37975");
    /* Connect to the MySQL test database */
    con->setSchema("test");
    stmt = con->createStatement();
    stmt->execute("DROP TABLE IF EXISTS test");
    stmt->execute("CREATE TABLE test(id INT)");
    delete stmt;
    /* '?' is the supported placeholder syntax */
    pstmt = con->prepareStatement("INSERT INTO test(id) VALUES (?)");
    for (int i = 1; i <= 10; i++) {
    pstmt->setInt(1, i);
    pstmt->executeUpdate();
    delete pstmt;
    /* Select in ascending order */
    pstmt = con->prepareStatement("SELECT id FROM test ORDER BY id ASC");
    res = pstmt->executeQuery();
    /* Fetch in reverse = descending order! */
    res->afterLast();
    while (res->previous())
    cout << "\t... MySQL counts: " << res->getInt("id") << endl;
    delete res;
    delete pstmt;
    delete con;
    } catch (sql::SQLException &e) {
    cout << "# ERR: SQLException in " << __FILE__;
    cout << "(" << __FUNCTION__ << ") on line "
    << __LINE__ << endl;
    cout << "# ERR: " << e.what();
    cout << " (MySQL error code: " << e.getErrorCode();
    cout << ", SQLState: " << e.getSQLState() <<
    " )" << endl;
    cout << endl;
    return EXIT_SUCCESS;

    It's not clear if you understand my question.
    Will you do me the favor of looking at your screen and tell me if there is a simple in front of any of the includes? Do you have a question mark "?" or any other error indicating that it can't find the include?
    Thanks!
    -- L. James
    L. D. James
    [email protected]
    www.apollo3.com/~ljames
    Danial Atash wrote on Fri, 07 August 2015 08:12my mySQL path is: "D:\Programs\Programming\MySQL\MySQL Server 5.5"
    and my mysql-connector c++ path that i download it from mysql's website is: "D:\Programs\Programming\MySQL\Connector C++"
    and my-boost library that i don't know what is it is: "D:\Programs\Programming\boost_1_57_0"
    i go to the eclipse and select the Project>>properties>>c/c++ build>>GCC C++ Comiler>>Includes and add below Item to Include path:
    - "D:\Programs\Programming\MySQL\Connector C++\include"
    - "D:\Programs\Programming\MySQL\MySQL Server 5.5\include"
    - "D:\Programs\Programming\boost_1_57_0\boost"
    and then i go to the Project>>properties>>c/c++ build>>MINGW C++ Linker>> Libraries and add below items to library search path:
    - "D:\Programs\Programming\MySQL\MySQL Server 5.5\lib"
    - "D:\Programs\Programming\MySQL\Connector C++\lib"
    now when i want to compile this program(from mysql example )
    #include <stdlib.h>
    #include <iostream>
    #include "mysql_connection.h"
    #include <cppconn/driver.h>
    #include <cppconn/exception.h>
    #include <cppconn/resultset.h>
    #include <cppconn/statement.h>
    #include <cppconn/prepared_statement.h>
    using namespace std;
    int main(void)
    cout << endl;
    cout << "Let's have MySQL count from 10 to 1..." << endl;
    try {
    sql::Driver *driver;
    sql::Connection *con;
    sql::Statement *stmt;
    sql::ResultSet *res;
    sql::PreparedStatement *pstmt;
    /* Create a connection */
    driver = get_driver_instance();
    con = driver->connect("tcp://127.0.0.1:3306", "root", "37975");
    /* Connect to the MySQL test database */
    con->setSchema("test");
    stmt = con->createStatement();
    stmt->execute("DROP TABLE IF EXISTS test");
    stmt->execute("CREATE TABLE test(id INT)");
    delete stmt;
    /* '?' is the supported placeholder syntax */
    pstmt = con->prepareStatement("INSERT INTO test(id) VALUES (?)");
    for (int i = 1; i <= 10; i++) {
    pstmt->setInt(1, i);
    pstmt->executeUpdate();
    delete pstmt;
    /* Select in ascending order */
    pstmt = con->prepareStatement("SELECT id FROM test ORDER BY id ASC");
    res = pstmt->executeQuery();
    /* Fetch in reverse = descending order! */
    res->afterLast();
    while (res->previous())
    cout << "\t... MySQL counts: " << res->getInt("id") << endl;
    delete res;
    delete pstmt;
    delete con;
    } catch (sql::SQLException &e) {
    cout << "# ERR: SQLException in " << __FILE__;
    cout << "(" << __FUNCTION__ << ") on line "
    << __LINE__ << endl;
    cout << "# ERR: " << e.what();
    cout << " (MySQL error code: " << e.getErrorCode();
    cout << ", SQLState: " << e.getSQLState() <<
    " )" << endl;
    cout << endl;
    return EXIT_SUCCESS;
    i see it is dont compile and i see these errors:
    - Description Resource Path Location Type
    fatal error: boost/shared_ptr.hpp: No such file or directory Working line 31, external location: D:\Programs\Programming\MySQL\Connector C++\include\mysql_connection.h C/C++ Problem
    i don't know why i cant connect mysql to eclipse. i tried to connect it more and more (at least 1 month)
    Please Help me!!!!

  • Whenever i try and open a social network app it comes up with an error message sayinng "Connect to itunes to use Push Notifications" I have successfully conntected to itunes via phone and computer however this message is still appearing and will not go?

    Whenever i try and open a social network app it comes up with an error message sayinng "Connect to itunes to use Push Notifications" I have successfully conntected to itunes via phone and computer however this message is still appearing and will not go, therefore i cannot use the apps?HELP PLEASE

    http://support.apple.com/kb/TS3281

  • JDBC connection pool failures when used by JMS stores

              We are using WebLogic 6.1 sp2. We defined a separate connection pool for use by
              a JMS Store.
              <JDBCConnectionPool Name="sybaseJMSPool"
              Targets="cluster00"
              InitialCapacity="2"
              MaxCapacity="10"
              DriverName="com.sybase.jdbc2.jdbc.SybDriver"
              Properties="[email protected]@;[email protected]@;charset=utf8"
              URL="jdbc:sybase:Tds:@jms.db.host@/@jms.db.name@"/>
              (note that the @xxx@ string are replaced by actual values).
              We are using Sybase Jconnect 5.5 to a Sybase ASE 12.5 database.
              We deployed this configuration on a number of environments (testing, staging,
              ..). The actual hardware and network configuration is different for the different
              system, but the WebLogic domain stays the same regarding this issue.
              On the test system we frequently get the following exceptions:
              <Aug 13, 2002 1:56:04 PM CEST> <Alert> <JMS> <www00-test> <node00>
              <ExecuteThread: '6' for queue: 'JMS.TimerClientPool'> <> <> <040048>
              <JMSServer "JMSServer00", store failure while writing message for topic
              OrderChangeTopic, java.io.IOException: JMS JDBC store, connection pool =
              <sybaseJMSPool>, prefix = <JMS00>: write failed
              java.sql.SQLException: JZ006: Caught IOException:
              com.sybase.jdbc2.jdbc.SybConnectionDeadException: JZ0C0: Connection is already
              closed.
              at com.sybase.jdbc2.jdbc.ErrorMessage.raiseErrorCheckDead
              (ErrorMessage.java:715)
              at com.sybase.jdbc2.tds.Tds.handleIOE(Tds.java:3124)
              at com.sybase.jdbc2.tds.Tds.cancel(Tds.java:1412)
              at com.sybase.jdbc2.tds.Tds.cancel(Tds.java:1341)
              at com.sybase.jdbc2.jdbc.SybStatement.doCancel(SybStatement.java:564)
              at com.sybase.jdbc2.jdbc.SybStatement.updateLoop(SybStatement.java:1672)
              at com.sybase.jdbc2.jdbc.SybStatement.executeUpdate
              (SybStatement.java:1625)
              at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeUpdate
              (SybPreparedStatement.java:91)
              at com.p6spy.engine.logging.P6LogPreparedStatement.executeUpdate
              (P6LogPreparedStatement.java:179)
              at weblogic.jdbc.pool.Statement.executeUpdate(Statement.java:293)
              at weblogic.jms.store.JDBCIOStream.write(JDBCIOStream.java:1246)
              at weblogic.jms.store.StoreRequest.doTheIO(StoreRequest.java:250)
              at weblogic.jms.store.JMSStore.execute(JMSStore.java:182)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              .>
              java.io.IOException: JMS JDBC store, connection pool = <sybaseJMSPool>, prefix
              = <JMS00>: write failed
              java.sql.SQLException: JZ006: Caught IOException:
              com.sybase.jdbc2.jdbc.SybConnectionDeadException: JZ0C0: Connection is already
              closed.
              at com.sybase.jdbc2.jdbc.ErrorMessage.raiseErrorCheckDead
              (ErrorMessage.java:715)
              at com.sybase.jdbc2.tds.Tds.handleIOE(Tds.java:3124)
              at com.sybase.jdbc2.tds.Tds.cancel(Tds.java:1412)
              at com.sybase.jdbc2.tds.Tds.cancel(Tds.java:1341)
              at com.sybase.jdbc2.jdbc.SybStatement.doCancel(SybStatement.java:564)
              at com.sybase.jdbc2.jdbc.SybStatement.updateLoop(SybStatement.java:1672)
              at com.sybase.jdbc2.jdbc.SybStatement.executeUpdate
              (SybStatement.java:1625)
              at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeUpdate
              (SybPreparedStatement.java:91)
              at com.p6spy.engine.logging.P6LogPreparedStatement.executeUpdate
              (P6LogPreparedStatement.java:179)
              at weblogic.jdbc.pool.Statement.executeUpdate(Statement.java:293)
              at weblogic.jms.store.JDBCIOStream.write(JDBCIOStream.java:1246)
              at weblogic.jms.store.StoreRequest.doTheIO(StoreRequest.java:250)
              at weblogic.jms.store.JMSStore.execute(JMSStore.java:182)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              at weblogic.jms.store.JDBCIOStream.throwIOException
              (JDBCIOStream.java:1213)
              at weblogic.jms.store.JDBCIOStream.write(JDBCIOStream.java:1256)
              at weblogic.jms.store.StoreRequest.doTheIO(StoreRequest.java:250)
              at weblogic.jms.store.JMSStore.execute(JMSStore.java:182)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              Before that this message appeared:
              <Aug 13, 2002 11:31:16 AM CEST> <Error> <ConnectionManager> <www00-test>
              <node00> <ExecuteThread: '26' for queue: 'default'> <> <> <000000>
              <Closing: 'weblogic.rjvm.t3.T3JVMConnection@795af6' because of: 'Server
              received a message over an uninitialized connection: 'JVMMessage from: 'null'
              to: '-4555218188801970213S:192.168.13.1:[7001,7001,7002,7002,7001,7002,-
              1]:ADIS:node00' cmd: 'CMD_REQUEST', QOS: '101', responseId: '1',
              invokableId: '287', flags: 'JVMIDs Not Sent, TX Context Not Sent', abbrev
              offset: '34'''>
              This problem did not occur on another system which was used during a 2 day stress
              testing session.
              It seems that the problem occurs after a period in which no user request where
              made. The user requests trigger EJB's that start sending JMS messages.
              When the problem occurs, the JMS messaging systems seems to lock up as no messages
              are received anymore by the different listeners (MDBs).
              Undeploying and redeploying the JBDC connection pool solves the problem. This
              solution is unacceptable in case of a production system.
              A similarly defined connection pool, which is used by the EJBs to make database
              connection, does not manifest this problem.
              <JDBCConnectionPool Name="sybasePool"
              Targets="cluster00"
              InitialCapacity="10"
              CapacityIncrement="5"
              MaxCapacity="50"
              PreparedStatementCacheSize="150"
              DriverName="com.sybase.jdbc2.jdbc.SybDriver"
              Properties="[email protected]@;[email protected]@;JCONNECT_VERSION=6;charset=utf8"
              URL="jdbc:sybase:Tds:@db.host@/@db.name@"/>
              The JDBC connection pool is used as follows by the JDBC store
              <JMSJDBCStore ConnectionPool="sybaseJMSPool" Name="JDBCStore00" PrefixName="JMS00"/>
              <JMSServer Name="JMSServer00" Store="JDBCStore00" Targets="node00">
              <JMSTopic JNDIName="ADIS.JMSError" JNDINameReplicated="false" Name="ErrorTopic"/>
              <JMSTopic JNDIName="ADIS.Status"
              Name="StatusTopic" RedeliveryDelayOverride="300000"/>
              <JMSTopic JNDIName="ADIS.OrderChange" JNDINameReplicated="false"
              Name="OrderChangeTopic" RedeliveryLimit="3"/>
              </JMSServer>
              Turning on the "Test Reserved Connection" with a appropriate test table does not
              help.
              Some sources on the internet tell us that JZ0C0 errors in the Jconnect driver
              can be related to network problems. Nevertheless the connection pool should be
              able to cope with this.
              Can you provide any solution for this ? Or give us hints what can cause the problem
              

    Zhenhao Qi wrote:
    thanks! Joe.
    The SQL statement itself can no longer be simplified, the long excuation time is due to the database size and complicated Select criteria. I can easily reproduce the problem by using this SQL. I tried "BEA's Oracle driver (Type 4): Version 8.1.7,9.0.1,9.2.0". the question can be dissect into 2 pieces:
    1) why the jdbc connection (using oracle.jdbc.OracleDriver) won't return anything if the SQL execution time > 5min, that is probably the Oracle's problem
    2) why the occupied connection pool won't release even I set "Statementtimeout=600", this is Weblogic's problem.
    ZhenhaoHi. Yes, (1) is oracle's problem. (2) may also be. The JDBC spec has very few
    allowances for one thread to interrupt a second thread's JDBC call. If we
    transmit your timeout request by calling setQueryTimeout() on the oracle
    statement, and if you have a weblogic-controlled transaction we call
    Statement.cancel() on any ongoing statement, we end up relying on whether
    the Oracle driver implements and responds to those calls.
    Are you doing weblogic-controlled transactions? Are you/can you
    call Statement.setQueryTimeout() on your statements, or are these
    generated JDBC queries?
    If you can duplicate the problem using the weblogic.jdbc.oracle.OracleDriver
    we have some other debug avenues. This would be good even if you really
    want to use the thin driver, because we will do the same JDBC calls to
    either driver, and the debug would prove (if) we set up a query timeout
    and if we call cancel(). If we do, then we can know that it is the Oracle
    driver failing in these regards.
    Joe

  • How do i connect to sql server using java?

    hi ever body
    i need to connect to sql server using java
    what is the driver i will use?
    thanks

    Microsoft make a jdbc driver and it is readily available through MSDN. Here is a link http://msdn2.microsoft.com/en-us/data/aa937724.aspx. Whatever jdbc driver you are looking for, Google it, and if it exists you'll find it in 10 seconds.

Maybe you are looking for