MySQL and dates

When you extract xml from a MySQL database you get the
following format for a date: 2006-08-29T21:01:07.0000000-07:00
I have managed to get flex to connect to the XML file,
display all the items in the XML file, to include the above
mentioned date. But the problem comes in formatting that date.
Obviously I don't want the user staring at that mess but all my
feeble attempts to format it in Flex haven't produced any results.
I tried to tackle the whole thing but all that did is turn the
jumbled mess into an empty column so I tried to go simple and just
pull the year (as shown below) and I still get nothing in that
column. Does anyone have any ideas on how to approach this?
<mx:DateFormatter id="DateDisplay" formatString="YYYY"
/>
<mx:DataGridColumn headerText="Last Access"
dataField="{DateDisplay.format(users_request.lastResult.last_access)}"
sortDescending="true"/>

alright so using your idea i have the following:
<mx:DataGridColumn dataField="last _access"
headerText="Last Access">
<mx:itemRenderer>
<mx:Component>
<mx:VBox>
<mx:DateFormatter id="dateFormatter"
formatString="YYYY"/>
<mx:Text
text="{dateFormatter.format(users_request.lastResult.last_access)}"/>
</mx:VBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
but now I am getting the following error message:
Severity Description Resource In Folder Location Creation
Time Id
2 1120: Access of undefined property users_request.
Statistics.mxml Statistics line 24 September 1, 2006 1:41:33 PM 15
so apparently it won't let me access that data in the same
manner as I did in my first example. So i thought maybe if I gave
the datagrid an id and then accessed it via that I might have
better results:
<mx:DataGrid id="mygrid" .....\>
<mx:Text
text="{dateFormatter.format(mygrid.last_access)}"/>
Severity Description Resource In Folder Location Creation
Time Id
2 1120: Access of undefined property mygrid. Statistics.mxml
Statistics line 24 September 1, 2006 1:34:54 PM 14
But I get a similiar error message as before. Any idea what
I'm missing?

Similar Messages

  • Generating CSV file with column names and data from the MySQL with JAVA

    Hi all,
    Give small example on ...
    How can I add column names and data to a CSV from from MySQL.
    like
    example
    sequence_no, time_date, col_name, col_name
    123, 27-apr-2004, data, data
    234, 27-apr-2004, data, data
    Pls give small exeample on this.
    Thanks & Regards
    Rama Krishna

    Hello Rama Krishna,
    Check this code:
    Example below exports data from MySQL Select query to CSV file.
    testtable structure
    CREATE TABLE testtable
    (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
    text varchar(45) NOT NULL,
    price integer not null);
    Application takes path of output file as an argument.
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.Statement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    public class automateExport {
        public static void main(String[] args) {
            DBase db = new DBase();
            Connection conn = db.connect(
                    "jdbc:mysql://localhost:3306/test","root","caspian");
            if (args.length != 1) {
                System.out.println(
                        "Usage: java automateExport [outputfile path] ");
                return;
            db.exportData(conn,args[0]);
    class DBase {
        public DBase() {
        public Connection connect(String db_connect_str,
                String db_userid, String db_password) {
            Connection conn;
            try {
                Class.forName("com.mysql.jdbc.Driver").newInstance();
                conn = DriverManager.getConnection(db_connect_str,
                        db_userid, db_password);
            } catch(Exception e) {
                e.printStackTrace();
                conn = null;
            return conn;
        public void exportData(Connection conn,String filename) {
            Statement stmt;
            String query;
            try {
                stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
                        ResultSet.CONCUR_UPDATABLE);
                //For comma separated file
                query = "SELECT id,text,price into OUTFILE  '"+filename+
                        "' FIELDS TERMINATED BY ',' FROM testtable t";
                stmt.executeQuery(query);
            } catch(Exception e) {
                e.printStackTrace();
                stmt = null;
    Greetings,
    Praveen Gudapati

  • How to handle blob data with java and mysql and hibernate

    Dear all,
    I am using java 1.6 and mysql 5.5 and hibernate 3.0 . Some time i use blob data type . Earlier my project's data base was oracle 10g but now i am converting it to Mysql and now i am facing problem to save and fetch blob data to mysql database . Can anybody give me the source code for blob handling with java+Mysql+Hibernate
    now my code is :--
    ==================================================
    *.hbm.xml :--
    <property name="image" column="IMAGE" type="com.shrisure.server.usertype.BinaryBlobType" insert="true" update="true" lazy="false"/>
    ===================================================
    *.java :--
    package com.shrisure.server.usertype;
    import java.io.OutputStream;
    import java.io.Serializable;
    import java.sql.Blob;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Types;
    import javax.naming.InitialContext;
    import javax.sql.DataSource;
    import oracle.sql.BLOB;
    import org.hibernate.HibernateException;
    import org.hibernate.usertype.UserType;
    import org.jboss.resource.adapter.jdbc.WrappedConnection;
    import com.google.gwt.user.client.rpc.IsSerializable;
    public class BinaryBlobType implements UserType, java.io.Serializable, IsSerializable {
    private static final long serialVersionUID = 1111222233331231L;
    public int[] sqlTypes() {
    return new int[] { Types.BLOB };
    public Class returnedClass() {
    return byte[].class;
    public boolean equals(Object x, Object y) {
    return (x == y) || (x != null && y != null && java.util.Arrays.equals((byte[]) x, (byte[]) y));
    public void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException {
    BLOB tempBlob = null;
    WrappedConnection wc = null;
    try {
    if (value != null) {
    Connection oracleConnection = st.getConnection();
    if (oracleConnection instanceof oracle.jdbc.driver.OracleConnection) {
    tempBlob = BLOB.createTemporary(oracleConnection, true, BLOB.DURATION_SESSION);
    if (oracleConnection instanceof org.jboss.resource.adapter.jdbc.WrappedConnection) {
    InitialContext ctx = new InitialContext();
    DataSource dataSource = (DataSource) ctx.lookup("java:/DefaultDS");
    Connection dsConn = dataSource.getConnection();
    wc = (WrappedConnection) dsConn;
    // with getUnderlying connection method , cast it to Oracle
    // Connection
    oracleConnection = wc.getUnderlyingConnection();
    tempBlob = BLOB.createTemporary(oracleConnection, true, BLOB.DURATION_SESSION);
    tempBlob.open(BLOB.MODE_READWRITE);
    OutputStream tempBlobWriter = tempBlob.getBinaryOutputStream();// setBinaryStream(1);
    tempBlobWriter.write((byte[]) value);
    tempBlobWriter.flush();
    tempBlobWriter.close();
    tempBlob.close();
    st.setBlob(index, tempBlob);
    } else {
    st.setBlob(index, BLOB.empty_lob());
    } catch (Exception exp) {
    if (tempBlob != null) {
    tempBlob.freeTemporary();
    exp.printStackTrace();
    st.setBlob(index, BLOB.empty_lob());
    // throw new RuntimeException();
    } finally {
    if (wc != null) {
    wc.close();
    public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException {
    final Blob blob = rs.getBlob(names[0]);
    return blob != null ? blob.getBytes(1, (int) blob.length()) : null;
    public Object deepCopy(Object value) {
    if (value == null)
    return null;
    byte[] bytes = (byte[]) value;
    byte[] result = new byte[bytes.length];
    System.arraycopy(bytes, 0, result, 0, bytes.length);
    return result;
    public boolean isMutable() {
    return true;
    public Object assemble(Serializable arg0, Object arg1) throws HibernateException {
    return assemble(arg0, arg1);
    public Serializable disassemble(Object arg0) throws HibernateException {
    return disassemble(arg0);
    public int hashCode(Object arg0) throws HibernateException {
    return hashCode();
    public Object replace(Object arg0, Object arg1, Object arg2) throws HibernateException {
    return replace(arg0, arg1, arg2);
    =================================================================
    can anyone give me the source code for this BinaryBlobType.java according to mysql blob handling ..

    Moderator action: crosspost deleted.

  • How to bulk import data into CQ5 from MySQL and file system

    Is there an easy way to bulk import data into CQ5 from MySQL and file system?  Some of the files are ~50MB each (instrument files).  There are a total of ~1,500 records spread over about 5 tables.
    Thanks

    What problem are you having writing it to a file?
    You can't use FORALL to write the data out to a file, you can only loop through the entries in the collection 1 by 1 and write them out to the file like that.
    FORALL can only be used for SQL statements.

  • Issue in bringing up CRS on ATG 10.1.1 with MySQL and Weblogic 10.3

    Hello,
    I am trying to bring up Commerce Reference Store as part of my evaluation using MySQL (bundled with ATG) and WebLogic 10.3.
    I followed the ATG Documentation on CRS with WebLogic and MySQL and I could not proceed because of the below error log. I keep getting error in OnlineCreateServerInstanceTask of CIM. I believe it should be some configuration problem, but could not think of any.
    As part of the installation, I use C:\jdk1.6.0_25. I verified my weblogic server is up through the admin console. I started MySQL before running the eval batch. Apart from starting MySQL server, I did not make any datasource/database configuration changes for ATG. I have not run any other scripts to configure MySQL too.
    Please guide me to resolve the problem.
    C:\ATG\ATG10.1.1\CommerceReferenceStore\Store\eval>configureEval.bat
    Do you wish to run the CRS evaluation installation? [Y/N]: y
    Do you wish to use an existing database for the CRS evaluation? [Y/N]: n
    The CRS evaluation install will attempt to create the database. Press [Return] t
    o continue or any other key to quit:
    Enter mysql database connection details
    Enter user name: admin
    Enter user password: admin
    Enter database name: crsprod
    Enter 'root' user password:
    Creating database...
    Finished database creation
    Enter weblogic admin server URL: http://localhost:7001
    Enter weblogic admin server username: weblogic
    Enter weblogic admin server password: weblogic123
    Buildfile: C:\ATG\ATG10.1.1\CommerceReferenceStore\Store\eval\evalbuild.xml
    all:
    [copy] Copying 1 file to C:\ATG\ATG10.1.1\CommerceReferenceStore\Store\eval
    [delete] Deleting: C:\ATG\ATG10.1.1\CommerceReferenceStore\Store\eval\cimOut.
    cim.tmp
    BUILD SUCCESSFUL
    Total time: 0 seconds
    Application Server: weblogic
    The following installed ATG components are being used to launch:
    ATGPlatform version 10.1.1 installed at C:\ATG\ATG10.1.1
    Created "C:\ATG\ATG10.1.1\home\CIM\startDynamo.jar" in 15,273ms.
    Nucleus running
    atg.cim.productconfig.productselector.ProductSelectionContextTask starting...
    (Searching for products... done.)
    atg.cim.productconfig.productselector.ProductSelectionContextTask finished.
    atg.cim.productconfig.appserver.AppServerSelectTask starting...
    atg.cim.productconfig.appserver.AppServerSelectTask finished.
    atg.cim.productconfig.appserver.AppServerPathTask starting...
    atg.cim.productconfig.appserver.AppServerPathTask finished.
    atg.cim.productconfig.appserver.DomainPathTask starting...
    atg.cim.productconfig.appserver.DomainPathTask finished.
    atg.cim.productconfig.appserver.UrlTask starting...
    atg.cim.productconfig.appserver.UrlTask finished.
    atg.cim.productconfig.appserver.UsernameTask starting...
    atg.cim.productconfig.appserver.UsernameTask finished.
    atg.cim.productconfig.appserver.PasswordTask starting...
    atg.cim.productconfig.appserver.PasswordTask finished.
    atg.cim.productconfig.appserver.AppServerSelectionPersistenceTask starting...
    atg.cim.productconfig.appserver.AppServerSelectionPersistenceTask finished.
    atg.cim.database.CreateSchemaTask starting...
    atg.cim.database.CreateSchemaTask finished.
    atg.cim.database.ImportDataTask starting...
    Combining template tasks...Success
    Importing (1 of 1) /CIM/tmp/import/nonswitchingCore-import1.xml:
    /CommerceReferenceStore/Store/Storefront/data/pricelists.xml to /atg/commerce/pr
    icing/priceLists/PriceLists
    /CommerceReferenceStore/Store/Storefront/data/stores.xml to /atg/store/stores/St
    oreRepository
    /CommerceReferenceStore/Store/Storefront/data/catalog-i18n.xml to /atg/commerce/
    catalog/ProductCatalog
    /CommerceReferenceStore/Store/Storefront/data/pricelists-i18n.xml to /atg/commer
    ce/pricing/priceLists/PriceLists
    /CommerceReferenceStore/Store/Storefront/data/sites.xml to /atg/multisite/SiteRe
    pository
    /CommerceReferenceStore/Store/Storefront/data/sites-i18n.xml to /atg/multisite/S
    iteRepository
    /CommerceReferenceStore/Store/Storefront/data/promos-i18n.xml to /atg/commerce/c
    atalog/ProductCatalog
    /CommerceReferenceStore/Store/Storefront/data/seotags-i18n.xml to /atg/seo/SEORe
    pository
    /CommerceReferenceStore/Store/Storefront/data/wishlists.xml to /atg/commerce/gif
    ts/Giftlists
    /CommerceReferenceStore/Store/Storefront/data/inventory.xml to /atg/commerce/inv
    entory/InventoryRepository
    /CommerceReferenceStore/Store/Storefront/data/users.xml to /atg/userprofiling/Pr
    ofileAdapterRepository
    /CommerceReferenceStore/Store/Storefront/data/orders.xml to /atg/commerce/order/
    OrderRepository
    /CommerceReferenceStore/Store/Storefront/data/orders-i18n.xml to /atg/commerce/o
    rder/OrderRepository
    /CommerceReferenceStore/Store/Storefront/data/storetext-i18n.xml to /atg/store/s
    tores/StoreRepository
    /CommerceReferenceStore/Store/Storefront/data/claimable-i18n.xml to /atg/commerc
    e/claimable/ClaimableRepository
    ... > Success
    All Imports Completed Successfully
    atg.cim.database.ImportDataTask finished.
    atg.cim.worker.common.PropertyFileClearPersistanceTask starting...
    atg.cim.worker.common.PropertyFileClearPersistanceTask finished.
    atg.cim.productconfig.serverinstance.ServerInstanceNameTask starting...
    atg.cim.productconfig.serverinstance.ServerInstanceNameTask finished.
    atg.cim.productconfig.serverinstance.PortBindingsSelectTask starting...
    atg.cim.productconfig.serverinstance.PortBindingsSelectTask finished.
    atg.cim.worker.common.MapPropertyFileCreatorTask starting...
    atg.cim.worker.common.MapPropertyFileCreatorTask finished.
    atg.cim.worker.common.MapPropertyFileCreatorTask starting...
    atg.cim.worker.common.MapPropertyFileCreatorTask finished.
    atg.cim.worker.common.MapPropertyFileCreatorTask starting...
    atg.cim.worker.common.MapPropertyFileCreatorTask finished.
    atg.cim.worker.common.MapPropertyFileCreatorTask starting...
    atg.cim.worker.common.MapPropertyFileCreatorTask finished.
    atg.cim.worker.common.MapPropertyFileCreatorTask starting...
    atg.cim.worker.common.MapPropertyFileCreatorTask finished.
    atg.cim.worker.common.MapPropertyFileCreatorTask starting...
    atg.cim.worker.common.MapPropertyFileCreatorTask finished.
    atg.cim.worker.common.MapPropertyFileCreatorTask starting...
    atg.cim.worker.common.MapPropertyFileCreatorTask finished.
    atg.cim.worker.common.MapPropertyFileCreatorTask starting...
    atg.cim.worker.common.MapPropertyFileCreatorTask finished.
    atg.cim.worker.common.MapPropertyFileCreatorTask starting...
    atg.cim.worker.common.MapPropertyFileCreatorTask finished.
    atg.cim.worker.common.MapPropertyFileCreatorTask starting...
    atg.cim.worker.common.MapPropertyFileCreatorTask finished.
    atg.cim.worker.common.MapPropertyFileCreatorTask starting...
    atg.cim.worker.common.MapPropertyFileCreatorTask finished.
    atg.cim.worker.common.MapPropertyFileCreatorTask starting...
    atg.cim.worker.common.MapPropertyFileCreatorTask finished.
    atg.cim.worker.common.MapPropertyFileCreatorTask starting...
    atg.cim.worker.common.MapPropertyFileCreatorTask finished.
    atg.cim.worker.common.MapPropertyFileCreatorTask starting...
    atg.cim.worker.common.MapPropertyFileCreatorTask finished.
    atg.cim.productconfig.serverinstance.MakeServerInstanceFromPatternTask starting.
    atg.cim.productconfig.serverinstance.MakeServerInstanceFromPatternTask finished.
    atg.cim.productconfig.appassembly.EarFileNameTask starting...
    atg.cim.productconfig.appassembly.EarFileNameTask finished.
    atg.cim.productconfig.deploy.weblogic.OnlineCreateServerInstanceTask starting...
    Error Executing Batch File
    atg.cim.worker.TaskException: Error deploying to weblogic
    atg.cim.worker.TaskException: Error exececuting batch file
    at atg.cim.flow.CimFlowCreator.startHeadlessCimFlow(CimFlowCreator.java:
    130)
    at atg.cim.Launcher.startCimFlow(Launcher.java:278)
    at atg.cim.Launcher.main(Launcher.java:99)
    Caused by: atg.cim.worker.TaskException: Error deploying to weblogic
    at atg.cim.worker.Task.handleException(Task.java:72)
    at atg.cim.productconfig.deploy.weblogic.OnlineCreateServerInstanceTask.
    execute(OnlineCreateServerInstanceTask.java:159)
    at atg.cim.headless.HeadlessExecutorImpl.executeTasks(HeadlessExecutorIm
    pl.java:150)
    at atg.cim.headless.HeadlessExecutorImpl.populateAndExecuteHeadlessTasks
    (HeadlessExecutorImpl.java:140)
    at atg.cim.batch.BatchChooserExecutor.populateAndExecuteHeadlessTasks(Ba
    tchChooserExecutor.java:169)
    at atg.cim.flow.CimFlow.headlessFlow(CimFlow.java:116)
    at atg.cim.flow.CimFlowCreator.startHeadlessCimFlow(CimFlowCreator.java:
    120)
    ... 2 more
    Caused by: C:\ATG\ATG10.1.1\CIM\plugins\Base\ant\cim-ant.xml:348: The following
    error occurred while executing this line:
    C:\ATG\ATG10.1.1\CIM\plugins\Base\ant\cim-ant.xml:254: The following error occur
    red while executing this line:
    C:\ATG\ATG10.1.1\CIM\plugins\Base\ant\cim-ant.xml:214: exec returned: 1
    at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(Projec
    tHelper.java:541)
    at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.jav
    a:394)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor132.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
    a:105)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
    at atg.cim.task.ant.utility.AntExecutionWrapper.executeAntTarget(AntExec
    utionWrapper.java:167)
    at atg.cim.worker.AntTask.executeAntTarget(AntTask.java:115)
    at atg.cim.productconfig.deploy.weblogic.OnlineCreateServerInstanceTask.
    execute(OnlineCreateServerInstanceTask.java:155)
    ... 7 more
    Caused by: C:\ATG\ATG10.1.1\CIM\plugins\Base\ant\cim-ant.xml:254: The following
    error occurred while executing this line:
    C:\ATG\ATG10.1.1\CIM\plugins\Base\ant\cim-ant.xml:214: exec returned: 1
    at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(Projec
    tHelper.java:541)
    at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.jav
    a:394)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor132.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
    a:105)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor132.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
    a:105)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.jav
    a:391)
    ... 20 more
    Caused by: C:\ATG\ATG10.1.1\CIM\plugins\Base\ant\cim-ant.xml:214: exec returned:
    1
    at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:636)
    at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:662)
    at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:487)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor132.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
    a:105)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor132.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
    a:105)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.jav
    a:391)
    ... 34 more
    Nucleus shutting down
    Nucleus shutdown complete
    Thanks.

    This error is resolved after following the logs in C:\ATG\ATG10.1.1\CIM\log\cim.log. The root cause is I used http as protocol instead of t3 while specifying weblogic admin url.
    http://localhost:7001 instead of t3://localhost:7001
    Thanks.

  • Performance with MySQL and Database connectivity toolbox

    Hi!
    I'm having quite some problems with the performance of MySQL and Database connectivity toolbox. However, I'm very happy with the ease of using database connectivity toolbox. The background is:
    I have 61 variables (ints and floats) which I would like to save in the MySQL-database. This is no problem, however, the loop time increases from 8ms to 50ms when using the database. I have concluded that it has to do with the DB Tools Insert Data.vi and I think that I have some kind of performance issue with this VI. The CPU never reach more the 15% of its maximum performance. I use a default setup and connect through ODBC.
    My questions are:
    1. I would like to save 61 variables each 8-10ms, is this impossible using this solution?
    2. Is there any way of increasing the performance of the DB Tools Insert Data.vi or use any other VI?
    3. Is there any way of adjusting the MySQL setup to achieve better performance?
    Thank you very much for your time.
    Regards,
    Mattias

    First of all, thank you very much for your time. All of you have been really good support to me.
    >> Is your database on a different computer?  Does your loop execute 61 times? 
    Database is on the same computer as the MySQL server.
    The loop saves 61 values at once to the database, in one SQL-statement.
    I have now added the front panel and block diagram for my test-VI. I have implemented the queue system and separate loops for producer and consumer. However, since the queue is building up faster then the consumer loop consumes values, the queue is building up quite fast and the disc starts working.
    The test database table that I add data to is created by a simple:
    create table test(aa int, bb char(15));
    ...I'm sure that this can be improved in some way.
    I always open and close the connection to the database "outside the loop". However, it still takes some 40-50 ms to save the data to the database table - so, unfortunatly no progress to far. I currently just want to save the data.
    Any more advise will be gratefully accepted.
    Regards,
    Mattias
    Message Edited by mattias@hv on 10-23-2007 07:50 AM
    Attachments:
    front panel 2.JPG ‏101 KB
    block diagram.JPG ‏135 KB

  • Preferences: Code Editor: Printing:  Add File Path and Date to Print Header?

    Is there a way to add file full path and date to the print file header for a SQL Worksheet when printing from the Code Editor?  So, for example, if my SQL worksheet is called MySQL.sql and is saved to C:\Myfiles\SQL_Code\, I'd like to print the full path 'C:\Myfiles\SQL_Code\MySQL.sql' and today's date as part of the print header along with the page numbers at the top of the code.   I see a Java preview in the Preferences: Code Editor: Printing window that mentions a "Today" date but I don't know Java and that is an uneditable preview.  I have checked the "Print File Header" check box.  Is the file header definition stored somewhere in a configuration file and/or is there a way to modify/customize the default file header?  
    I am a new user to SQL Nav. version 3.2.20.09 Build-MAIN  09.87. I could do this in SQL Navigator but can't figure it out in SQLDeveloper. Thank you.
    -Cathy

    HI
    First of all,
    Unless otherwise you selected some option like page break after/before - both body and header/footer will print on same page in report, so in pdf as well.
    If you have difference on report and PDF that you should look into your setup.
    If you want more help, please be particular on your issue
    james. wrote:
    Hi All,
    I am using Oracle Report 10g. How can I add header and footer on same page as my body? Right now when a generate a pdf file, it is printing individual pages instead of 1 one page. Please help me.
    Regards

  • Using MySql and PHP with Dreamweaver on a Mac

    Hello all,
    As always if the answers to these questions are obscenely
    obvious please humour me.
    I use XHTML and CSS in my websites and realise that it is
    time that I dabbled with SSI. So I've started using PHP.
    However, I have been following the installation directions of
    MySql and am running into problems. I am installing the relavent
    software and am then unable to find it on my Mac, the startup files
    are there but the actual MySql data appears to not be installed
    despite my computer telling me it is...... I am using a G3 running
    OSX 10.4 is this good enough? I noticed talk of needing a PowerPC
    or Intel mac. Is this the case?
    Also, would I need MySql installed on my actual computer if
    the my servers have it already? And does Dreamweaver 8 have both of
    these programs installed as standard?
    If you could help out I would be very appreciative as I would
    like to learn this stuff and I appear to be struggling at the
    outset....
    Cheers
    M.A

    M.A.Wilson wrote:
    > However, I have been following the installation
    directions of MySql and am
    > running into problems. I am installing the relavent
    software and am then unable
    > to find it on my Mac, the startup files are there but
    the actual MySql data
    > appears to not be installed despite my computer telling
    me it is...... I am
    > using a G3 running OSX 10.4 is this good enough? I
    noticed talk of needing a
    > PowerPC or Intel mac. Is this the case?
    MySQL is a relational database management system that
    comprises a
    database server and several utility programs. Although you
    install it
    like any other program on a Mac, the similarity stops there.
    First, the point about PowerPC and Intel Macs is that there
    are
    different versions of the MySQL installer for each type of
    processor.
    I'm pretty sure that a G3 is OK, but you must choose the
    PowerPC version
    of MySQL, not the 64-bit or x86 (Intel Mac) version.
    Once you have installed MySQL, you need to drag the
    MySQL.PrefPane icon
    from the disk image onto your System Preferences. This
    installs a
    Preference Pane that enables you to start and stop MySQL. The
    Preference
    Pane has an option to start up MySQL automatically, but in my
    experience, it doesn't work on Tiger. You need to open the
    Preference
    Pane, and click Start MySQL Server each time you start your
    computer.
    The best way to work with MySQL is to use a graphical
    interface, such as
    phpMyAdmin. As Osgood has mentioned, I have written a book
    about PHP and
    Dreamweaver, which goes into all the necessary details. It's
    also very
    Mac-friendly with separate instructions where necessary for
    PC and Mac.
    More details here:
    http://foundationphp.com/dreamweaver8/
    David Powers
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "Foundation PHP 5 for Flash" (friends of ED)
    http://foundationphp.com/

  • Database setup with MySQL and PHP question

    Hello all,
    I recently had a problem getting a report to work for a site I was updating.  This site is written in PHP with a MySQL database.  The application is to track customer calls to auto repair stores.  The database has a lot of foreign keys because they wanted to update information in only one spot and have multiple records be updated all at once.  So, I've got all the information from individual calls saved in the call_log table, and have foreign keys to reference information in other tables (for example this table lists what store received the call referencing the store table).  If a store changes locations, they want to have reports automatically update with the new address, connection to conversation number, etc.
    In one of the responses to my question on how to get this report to work, I was told that this could be done without using foreign keys (by Normalizing the database using mapping tables).  I am still a newbie to MySQL, and after looking though a lot of manuals, tutorials, and forum posts, I am more confused now than ever.
    I got the report to work using the foreign keys, but I would like to learn what I should have done with the database (and how to get the information displayed).
    So for example one report would be displaying the following:
               Store                                                      Reason for the Customer Call
                                               breaks             oil change            shocks              tune up         total calls
    5636 - Bloomington                  2                       4                        0                       2                   8
    8875 - Duluth                           1                       6                       4                        8                  19
    with links on the store name to pull up the information on that specific store.  How would I change the database (listed below) to do this without foreign keys?  Any help would be greatly appreciated.
    call_log             (table that contains the following:)
    call_id
    conv_number
    date
    camp_type         (foreign key to the campaign table so it displays the campaign_id)
    reason               (foreign key to the call_reason table so it displays the reason_id)
    location              (foreign key to the store table so it displays the store_id)
    associate
    call_summary
    trainig_issue      (foreign key to the training_points table so it displays the training_key_id)
    visit_closed
    example            (foreign key to the example_type table so it displays the example_id)
    campaign          (table that contains the following:)
    campaign_id
    campaign_name
    campaign_promotion
    campaign_coupon
    campaign_startdate
    campaign_enddate
    call_reason       (table that contains the following:)
    reason_id
    reason
    store               (table that contains the following:)
    store_id
    store_number
    store_address
    store_city
    store_state
    store_postalcode
    store_name
    store_phone
    store_email
    store_mgr
    training_points  (table that contains the following:)
    training_key_id
    key_issue
    policy
    example_type  (table that contains the following:)
    example_id
    example_name
    example_image
    Thank you very much.

    Frankly, that is way to much of a question to be answered in detail on a forum... There's a lot involved and a lot of general database understanding required. I would highly recommend:
    Database Design for Mere Mortals:                       A Hands-On Guide to Relational Database Design, Second                       Edition -- by Michael                     J. Hernandez
    This is an invaluable book to get you going in the right direction and on a firm foundation.
    Lawrence   *Adobe Community Expert*
    www.Cartweaver.com
    Complete Shopping Cart Application for
    Dreamweaver, available in ASP, PHP and CF
    www.twitter.com/LawrenceCramer

  • BUG: Export DDL and Data fails for mixed case table/column names

    Hi there,
    I have found a bug in SQL Developer. See details below.
    Description:
    When "Export DDL and Data) function is used on a table/columns not named in UPPERCASE, sql generated by SQL Developer is invalid.
    Steps to reproduce:
    - open SQL Developer, connect to DB
    - make a table named "lowerCase" (in double quotes, so it won't be automatically changed to capital letters)
    - you may also add some columns, for example "lowerCol1", "UpCol2", ALLUPCOL3
    - add some data rows to the table
    - choose Tools -> Export DDL and Data
    - check exporting of tables and data, on "filter" tabs choose your "lowerCase" table
    - press "Apply"
    Error:
    Generated SQL contains invalid INSERTs: mixed-case table and columns are referenced without obligatory double quotes, which yields an error when generated script is executed (see below, relevant line is underlined)
    -- DDL for Table lowerCase
    CREATE TABLE "DBO_HT"."lowerCase"
    (     "lowerCol1" VARCHAR2(100),
         "UpCol2" VARCHAR2(100),
         "ALLUPCOL3" VARCHAR2(100)
    -- DATA FOR TABLE lowerCase
    -- FILTER = none used
    -- INSERTING into lowerCase
    Insert into lowerCase (lowerCol1,UpCol2,ALLUPCOL3) values ('lc','uc','auc');
    -- END DATA FOR TABLE lowerCase
    Remarks
    SQL Developer: version 1.2.1, build MAIN-32.13
    Oracle DBs: 9.2 & Express
    OS: Windows 2000 Professional
    If you need any more details/testing, let me know. I'd really appreciate a quick patch for this issue...
    Alternatively, do you know of any other simple way of copying a single database (it's called a schema in Oracle, right?) from one computer to another? Possibly something so simple like detaching->copying->reattaching mdf (data) files in SQL Server... I thought that this "Export DDL&Data" function will do, but as you can see I couldn't use it.
    I just need a simple solution that works - one operation on source to stuff, get the resulting files to other computer and one operation to have it running there... I think that such scenario is very basic, yet I just can't achieve it and I am simply not allowed to spend more time on it (read: our test project fails, my company rejects my "lobbying" and stays with MSSQL :/ )
    Thanks a lot & bye

    Thanks for your reply.
    ad. 1)
    You're right. I just wanted to give some very short feedback on my experiences with SQL Developer, so I didn't think starting new threads would be necessary, but as I was writing it became much bigger than I initially planned - sorry about that. I will make proper threads as soon as possible. Having "Edit post" button on this forum would also be useful.
    ad. 2)
    Generally, you're right - in most cases it's true that "switching DBMS is a major commitment" and "you will produce terrible code" if you don't learn the new one.
    However, I think that you miss one part of market here - the market that I think Express is also targeted on. I'd call it a "fire&forget databases" market; MySQL comes to mind as possibly most common solution here. It's the rather small systems, possibly web-accessed, whose data-throughput requirements are rather modest; the point is to store data at all, and not necesarily in fastest way, because given the amount of data that is used, even on low-end hardware it will work well enough. What's important here is its general ease of use - how easy is to set up such system, connect and access data, develop a software using it, how much maintenance is needed, how easy this maintenance is, how easy are the most common development tasks as creating a DB, moving a DB from test to production server etc. There, "how easy" directly translates to "how much time we need to set it up", which translates to "how much will the development will cost".
    Considering the current technology, switching the DBMS in such systems is not necesarily a major commitment and believe me that you will not produce terrible code. In many cases it's as simple as changing a switch in your ORM toolkit: hibernate.dialect = Hibernate.Dialect.OracleDialect vs MySQLDialect vs MsSql2005Dialect
    Therefore, in some part of market it's easy to switch DBMS, even on project-by-project basis. The reason to switch will appear when other DBMS makes life easier => development faster. From that point of view, I can understand my colleagues giving me an embarassing look and saying "come on, I won't read all these docs just to have db copied to test server". And it doesn't mean "they are not willing to learn anything new", it's just that they feel such basic task should have self-explaining solution that doesn't require mastering any special knowledge. And if they get such simple solutions somewhere else, it costs them nothing to change the hibernate dialect.
    I think Oracle did the great job with introducing the Express to this "fire&forget" market. The installation is a snap, it just works out of the box, nothing serious to configure, opposite to what I remember from installing and working on Oracle 9 a few years ago. In some places it's still "you need to start SQL*Plus and enter this script", but it's definitely less than before. I also find the SQL Developer a great tool, it can do most of what we need to do with the DB, it's also much better and pleasant to use over Oracle 9 tools. Still, a few basic things still require too much hassle, and I'd say taking your schema to another machine is one of them. So I think that, if you do it well, the "schema copy wizard" you mentioned might be very helpful. If I was to give any general advice for Express line of DB/tools, I'd say "make things simple" - make it "a DB you can't see".
    That's, IMHO, the way to attract more Express users.

  • Apache, MySQL, and PHP

    I am new PHP development and working on a test project. I've installed Apache, MySQL and PHP on my Windows XP box and now I'm a little confused. I created a database and some sample code to retrieve data. Now, on a server I'm using which supports this how do I upload this to the server for use?
    I hope this makes sense. Is there a built-in app for that or do I upload my created db to the server.
    UPDATE: I forgot to add that I am working locally and now would like to port this over to my domain and server. My host uses a linux box with apache.
    Thanks in advance,
    mdawg

    Hi,
    Download the mysql admin gui from here : http://dev.mysql.com/downloads/gui-tools/5.0.html
    If your host server allows connections from other hosts you can use the mysql gui to connect to the local database as well as the host database and export the tables to your new database on the host. This is the way I prefer to do it... but some hosts only allow SQL connections from the localhost itself which basically means you won't be able to connect to it using the mysql gui tools.
    However you can still generate the database scripts from the gui tools and login to your hosts mysql manager - possibly phpMyAdmin and then simply execute the SQL script.
    Hope this helps,
    Brendan

  • Ruby and Mysql and Nmap

    I am trying to create a table name in a mysql database using ruby scripts. The name of the table should be the current date. this is how i tried to do it, but didnt work:
    in the ruby code:
    TOS = Time.now.localtime.strftime("%Y-%m-%d_#{Time.now.hour}:#{Time.now.min}")
    dbh = Mysql.real_connect("localhost", "testuser", "testpass", "test")
    dbh.query("CREATE TABLE #{TOS}
    IP VARCHAR(10),
    PORT VARCHAR(5),
    SERVICE VARCHAR(40)
    This doesnt work for some reason.. I started ruby yesterday so easy comments about my ignorance

    The article at http://developer.apple.com/tools/developonrailsleopard.html suggests updating Rails and installed gems.
    I ran the following:
    $ sudo gem update --system
    $ sudo gem install rails
    $ sudo gem update rake
    and all was well. Then I ran
    $sudo gem install mysql
    and got the following output.
    norbert:vocab bwelling$ sudo gem install mysql
    Building native extensions. This could take a while...
    ERROR: Error installing mysql:
    ERROR: Failed to build gem native extension.
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb install mysql
    can't find header files for ruby.
    Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/mysql-2.7 for inspection.
    Results logged to /Library/Ruby/Gems/1.8/gems/mysql-2.7/gem_make.out
    norbert:vocab bwelling$
    Ideas??
    So... Something is jacked, that's for sure.

  • Difference between "Data replication", "Data Cloning", "Data duplication" and "Data Migration"

    Hi Gurus,
    Can anyone tell me the difference between "Data replication", "Data Cloning", "Data duplication" and "Data Migration". I have gone through Google but doesn't find any appropriate answer for that where I can find the difference.
    It would be highly appreciated if you give me a link for all and give me some point out.
    Thanks & Regards
    Nimai Karmakar

    Here is how I see the terms used and understood by most folks
    "Data replication"
    This is the keeping the same data in sync in 2 different databases.  Replication is the process of keeping data in sync between 2 environments/databases and not limited to Oracle to Oracle, it could be Oracle to MySQL to be kept in sync, MySQL to Oracle, Oracle to SQL Server, SQL Server to Oracle.  The purpose of keeping data in sync can vary, but that is basic description of what it is.
    "Data Cloning"
    Make a copy of the data/database from one database environment to another, like for example taking production database and cloning the database to a pre-production database/environment for testing.  Coning term is used more when copying a database not just data, but the whole database so typically you hear the reference "Database Cloning", but data cloning is basically the making a copy of the data from one place to another.  Sometimes Cloning and Duplicating are used in the same way by folks as the basic end result is the same you are making a copy of the data to someplace else.
    "Data duplication"
    This is typically term when duplicating the data from one environment to another for a particular purpose, a lot of folks use "Data/Database Cloning" and "Data Duplication" in the same context, meaning they use them to mean the same thing, but I see more difference in the terms so when they are different Data Duplication is done when combining 2 databases to 1 therefore you can not clone the 2 databases into one so this term would be used more in those circumstances.
    "Data Migration"
    Moving data from one location/database to another location database, for example moving from MySQL to Oracle you would do a data migration from MySQL to Oracle as you are moving the data from MySQL to Oracle and going to leave it in Oracle.  You could also be migrating to from Oracle 10g environment to a new Oracle 11g environment, therefore "Migration" is typically used when referring to moving the data from one environment to another and the source and target are different in location, database vendor, database version.
    These are very simple ways of looking at the terms from my experience on how they are used.

  • I downloaded mySQL and mySQL driver NOW  WHAT ?

    I downloaded the mySQL and the mySQL driver. What do I do now ?
    I saw a book "mySQL and PHP for Dummies" . What is PHP ?
    Can you give me direction ?
    (without the "go read the archives" type of non-helpful help ?)
    Thank you in advance
    Stan

    If it's PHP and MySQL you're interested in, why are you posting to a Java forum?
    PHP is a Web scripting language:
    http://www.php.net/
    If you want to use MySQL with Java, you'll have to learn enough about SQL and relational databases to be able to get into MySQL, create some tables and users, and add some data. Then you'll use the MySQL JDBC driver to let your Java app access those database tables and do CRUD operations on them (Create/Read/Update/Delete).
    There's a JDBC tutorial under the Tutorials link to the left on this page.
    Here's a Java app that will let you run any valid SQL statement you wish against any database:
    import java.sql.*;
    import java.util.*;
    public class DataConnection
        public static final String DEFAULT_DRIVER   = "sun.jdbc.odbc.JdbcOdbcDriver";
        public static final String DEFAULT_URL      = "jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\\Edu\\Java\\Forum\\DataConnection.mdb";
        public static final String DEFAULT_USERNAME = "admin";
        public static final String DEFAULT_PASSWORD = "";
        /** Database connection */
        private Connection connection;
         * Driver for the DataConnection
         * @param command line arguments
         * <ol start='0'>
         * <li>SQL query string</li>
         * <li>JDBC driver class</li>
         * <li>database URL</li>
         * <li>username</li>
         * <li>password</li>
         * </ol>
        public static void main(String [] args)
            DataConnection db = null;
            try
                if (args.length > 0)
                    String sql      = args[0];
                    String driver   = ((args.length > 1) ? args[1] : DEFAULT_DRIVER);
                    String url      = ((args.length > 2) ? args[2] : DEFAULT_URL);
                    String username = ((args.length > 3) ? args[3] : DEFAULT_USERNAME);
                    String password = ((args.length > 4) ? args[4] : DEFAULT_PASSWORD);
                    db = new DataConnection(driver, url, username, password);
                    Object result = db.executeSQL(sql);
                    System.out.println(result);
                else
                    System.out.println("Usage: db.DataConnection <sql> <driver> <url> <username> <password>");
            catch (SQLException e)
                System.err.println("SQL error: " + e.getErrorCode());
                System.err.println("SQL state: " + e.getSQLState());
                e.printStackTrace(System.err);
            catch (Exception e)
                e.printStackTrace(System.err);
            finally
                if (db != null)
                    db.close();
                db = null;
         * Create a DataConnection
         * @throws SQLException if the database connection fails
         * @throws ClassNotFoundException if the driver class can't be loaded
        public DataConnection() throws SQLException,ClassNotFoundException
            this(DEFAULT_DRIVER, DEFAULT_URL, DEFAULT_USERNAME, DEFAULT_PASSWORD);
         * Create a DataConnection
         * @throws SQLException if the database connection fails
         * @throws ClassNotFoundException if the driver class can't be loaded
        public DataConnection(final String driver,
                              final String url,
                              final String username,
                              final String password)
            throws SQLException,ClassNotFoundException
            Class.forName(driver);
            this.connection = DriverManager.getConnection(url, username, password);
         * Clean up the connection
        public void close()
            try
                this.connection.close();
            catch (Exception e)
                ; // do nothing; you've done your best
         * Execute ANY SQL statement
         * @param SQL statement to execute
         * @returns list of row values if a ResultSet is returned,
         * OR an altered row count object if not
         * @throws SQLException if the query fails
        public Object executeSQL(final String sql) throws SQLException
            Object returnValue      = null;
            Statement statement     = this.connection.createStatement();
            boolean hasResultSet    = statement.execute(sql);
            if (hasResultSet)
                ResultSet rs            = statement.getResultSet();
                ResultSetMetaData meta  = rs.getMetaData();
                int numColumns          = meta.getColumnCount();
                List rows               = new ArrayList();
                while (rs.next())
                    Map thisRow = new LinkedHashMap();
                    for (int i = 1; i <= numColumns; ++i)
                        String columnName   = meta.getColumnName(i);
                        Object value        = rs.getObject(columnName);
                        thisRow.put(columnName, value);
                    rows.add(thisRow);
                rs.close();
                statement.close();
                returnValue = rows;
            else
                int updateCount = statement.getUpdateCount();
                returnValue     = new Integer(updateCount);
            return returnValue;
    }Maybe it'll help get you started with Java and JDBC. You're on your own with PHP. - MOD

  • DSO - What key fields and data fields in dso

    Hi experts,
    I need to create a dso in between the cube and 2 data sources(2lis_11_vaitm, 2lis_12_vcscl) to stage the data. My question is: what key fields and data fields to choose for the dso? is there a standard dso to copy? please explain in detail the model to set up, whether to connect both the ds's to dso and then to cube or one ds to dso and the other to the cube. more details will help.

    Check this for standard DSO:
    http://help.sap.com/saphelp_nw04/helpdata/en/43/fcdc387f34384f94c3227baf3837a8/content.htm
    Thanks...
    Shambhu

Maybe you are looking for

  • The Group Policy Client Service Failed The Logon

    Hello, When our students login to our Windows 7 machines they are getting this error: The Group Policy Client Service Failed The Logon Access is denied. We are attempting to use both volatile and roaming profiles. The profiles are being stored on the

  • Config settings for Closed indicator in PR

    Dera experts , I want the system to automatically set the "closed " indicator in PR "quantity/Dates" tab , once a PO has been generated ( fully/partially ordered) Can anyone tell me the settings for the same ??   Regards   Anis

  • Mac Does not start up

    Well , i got a mac a few months back , April to be exact , so , its still under warranty ... ..either way , whenever i turn on the mac , it comes to the loading screen :the apple logo appears and the loading sign some ....and it keeps loading and doe

  • Deploy soa suite services to HTTPS using Ant

    All, I hope somebody can assist. I have developed an ant script, which deploys to a soa server (using Oracle SOA suite 11 R3). This works great for HTTP, but I need to deploy SOA services to a HTTPS configured soa and weblogic server. I have changed

  • Agenda Builder for Bangalore - is it ready?

    Hi all, has anyone been able to access the Agenda Builder yet? I've registered for Bangalore TechEd and the email says this tool will be available in early October. Cheers Stephen