Date store in database

hi,
i try to store date in database but not work,
i use sun java studio creator 2 up 1
my bean file functiom is
public String button1_action() {
// TODO: Process the button click action. Return value is a navigation
// case name where null will return to the same page.
String text1 = (String)textField1.getValue();
String text2 = (String)textField2.getValue();
Calendar calc = (Calendar)calendar1.getValue();
staticText1.setValue(text1 + text2 + calc);
Connection conn = null;
Statement stmt = null;
String flduser_user = text1;
String flduser_password = text2;
Calendar flduser_calander = calc;
try {
String username = "root";
String password = "root";
String url="jdbc:mysql://localhost/db";
Class.forName("com.mysql.jdbc.Driver").newInstance();
conn = DriverManager.getConnection(url,username,password);
stmt = conn.createStatement();
stmt.executeUpdate("INSERT INTO userinfo(userId,pass,date1) VALUES ('" + (flduser_user) + "', +(flduser_password) +) ");
//rs = stmt.executeQuery(insertQuery);
} catch (Exception e) {
System.err.println("Cannot connect to database server");
} finally {
if (conn != null) {
try {
conn.close();
} catch (Exception e) {
return null;
jsp ile
<?xml version="1.0" encoding="UTF-8"?>
<jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
<jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
<f:view>
<ui:page binding="#{Page1.page1}" id="page1">
<ui:html binding="#{Page1.html1}" id="html1">
<ui:head binding="#{Page1.head1}" id="head1">
<ui:link binding="#{Page1.link1}" id="link1" url="/resources/stylesheet.css"/>
</ui:head>
<ui:body binding="#{Page1.body1}" id="body1" style="-rave-layout: grid">
<ui:form binding="#{Page1.form1}" id="form1">
<ui:textField binding="#{Page1.textField1}" id="textField1" style="height: 24px; left: 0px; top: 72px; position: absolute; width: 216px"/>
<ui:button action="#{Page1.button1_action}" binding="#{Page1.button1}" id="button1"
style="position: absolute; left: 168px; top: 120px; width: 144px; height: 24px" text="Press me"/>
<ui:staticText binding="#{Page1.staticText1}" id="staticText1"
style="position: absolute; left: 144px; top: 168px; width: 240px; height: 24px" text="d"/>
<ui:textField binding="#{Page1.textField2}" id="textField2" style="height: 24px; left: 240px; top: 72px; position: absolute; width: 192px"/>
<ui:calendar binding="#{Page1.calendar1}" dateFormatPattern="yyyy-MM-dd" id="calendar1" style="height: 24px; left: 456px; top: 72px; position: absolute; width: 144px"/>
</ui:form>
</ui:body>
</ui:html>
</ui:page>
</f:view>
</jsp:root>

What is the error? If it is a JDBC error, try the JDBC forum.

Similar Messages

  • Concurrent Data Store (CDB) application hangs when it shouldn't

    My application hangs when trying to open a concurrent data store (CDB) database for reading:
    #0 0x0000003ad860b309 in pthread_cond_wait@@GLIBC_2.3.2 ()
    from /lib64/libpthread.so.0
    #1 0x00007ffff7ce67de in __db_pthread_mutex_lock (env=0x610960, mutex=100)
    at /home/steve/ldm/package/src/Berkeley-DB/dist/../mutex/mut_pthread.c:318
    #2 0x00007ffff7ce5ea5 in __db_tas_mutex_lock_int (env=0x610960, mutex=100,
    nowait=0)
    at /home/steve/ldm/package/src/Berkeley-DB/dist/../mutex/mut_tas.c:218
    #3 0x00007ffff7ce5c43 in __db_tas_mutex_lock (env=0x610960, mutex=100)
    at /home/steve/ldm/package/src/Berkeley-DB/dist/../mutex/mut_tas.c:248
    #4 0x00007ffff7d3715b in __lock_id (env=0x610960, idp=0x0, lkp=0x610e88)
    at /home/steve/ldm/package/src/Berkeley-DB/dist/../lock/lock_id.c:68
    #5 0x00007ffff7da1b4d in __fop_file_setup (dbp=0x610df0, ip=0x0, txn=0x0,
    name=0x40b050 "registry.db", mode=0, flags=1024, retidp=0x7fffffffdd94)
    at /home/steve/ldm/package/src/Berkeley-DB/dist/../fileops/fop_util.c:243
    #6 0x00007ffff7d70c8e in __db_open (dbp=0x610df0, ip=0x0, txn=0x0,
    fname=0x40b050 "registry.db", dname=0x0, type=DB_BTREE, flags=1024,
    mode=0, meta_pgno=0)
    at /home/steve/ldm/package/src/Berkeley-DB/dist/../db/db_open.c:176
    #7 0x00007ffff7d673b2 in __db_open_pp (dbp=0x610df0, txn=0x0,
    fname=0x40b050 "registry.db", dname=0x0, type=DB_BTREE, flags=1024, mode=0)
    at /home/steve/ldm/package/src/Berkeley-DB/dist/../db/db_iface.c:1146
    I suspect that the database environment believes that another process has the database open for writing. This cannot be the case, however, as all applications that access the database do so via an interface library I wrote that registers a termination function via the atexit() system-call to ensure that both the DB and DB_ENV handles are properly closed -- and all previously-executed applications terminated normally.
    The interface library opens the database like this (apparently, this forum doesn't support indentation, sorry):
    int status;
    Backend* backend = (Backend*)malloc(sizeof(Backend));
    if (NULL == backend) {
    else {
    DB_ENV* env;
    if (status = db_env_create(&env, 0)) {
    else {
    if (status = env->open(env, path,
    DB_CREATE | DB_INIT_CDB | DB_INIT_MPOOL, 0)) {
    else {
    DB* db;
    if (status = db_create(&db, env, 0)) {
    else {
    if (status = db->open(db, NULL, DB_FILENAME, NULL,
    DB_BTREE, forWriting ? DB_CREATE : DB_RDONLY, 0)) {
    else {
    backend->db = db;
    } /* "db" opened */
    if (status)
    db->close(db, 0);
    } /* "db" allocated */
    if (status) {
    env->close(env, 0);
    env = NULL;
    } /* "env" opened */
    if (status && NULL != env)
    env->close(env, 0);
    } /* "env" allocated */
    if (status)
    free(backend);
    } /* "backend" allocated */
    This code encounters no errors.
    The interface library also registers the following code to be executed when any process that uses the interface library exits:
    if (NULL != backend) {
    DB* db = backend->db;
    DB_ENV* env = db->get_env(db);
    if (db->close(db, 0)) {
    else {
    if (env->close(env, 0)) {
    else {
    /* database properly closed */
    As I indicated, all previously-executed processes that use the interface library terminated normally.
    I'm using version 4.8.24.NC of Berkeley DB on the following platform:
    $ uname -a
    Linux gilda.unidata.ucar.edu 2.6.27.41-170.2.117.fc10.x86_64 #1 SMP Thu Dec 10 10:36:29 EST 2009 x86_64 x86_64 x86_64 GNU/Linux
    Any ideas?

    Bogdan,
    That can't be it. I'm using a structured programming style in which the successful initialization of a cursor is ultimately followed by a closing of the cursor. There's only one place where the code does this and it's obvious that the cursor gets released.
    I've also read the CDB section.
    --Steve Emmerson                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Redhat: TT0837: Cannot attach data store shared-memory segment, error 12

    Customer has two systems, one Solaris and one Linux.  We have six DSNs with one dsn PermSize at 1.85G.  Both OS systems are 32-bit.   After migrating from TT6.0 to 11.2,  I can not get replication working on the Linux system for the 1.85G dsn.   The Solaris system is working correctly.   I've been able to duplicate the issue in out lab also.  If I drop the PermSize down to 1.0G, replication is started.   I've tried changing multiple parameters including setting up HugePages.  
    What else could I be missing?  Decreasing the PermSize is not an option for this customer.   Going to a full 64-bit system is on our development roadmap but is at least a year away due to other commitments.
    This is my current linux lab configuration.
    ttStatus output for the failed Subscriber DSN and a working DynamicDB DSN.    As you can see, the policy is set to "Always" but it has no Subdaemon or Replication processes running.
    Data store /space/Database/db/Subscriber
    There are no connections to the data store
    Replication policy  : Always
    Replication agent is running.
    Cache Agent policy  : Manual
    Data store /space/Database/db/DynamicDB
    There are 14 connections to the data store
    Shared Memory KEY 0x5602000c ID 1826586625 (LARGE PAGES, LOCKED)
    Type            PID     Context     Connection Name              ConnID
    Replication     88135   0x56700698  LOGFORCE                          4
    Replication     88135   0x56800468  REPHOLD                           3
    Replication     88135   0x56900468  TRANSMITTER                       5
    Replication     88135   0x56a00468  REPLISTENER                       2
    Subdaemon       86329   0x08472788  Manager                        2032
    Subdaemon       86329   0x084c5290  Rollback                       2033
    Subdaemon       86329   0xd1900468  Deadlock Detector              2037
    Subdaemon       86329   0xd1a00468  Flusher                        2036
    Subdaemon       86329   0xd1b00468  HistGC                         2039
    Subdaemon       86329   0xd1c00468  Log Marker                     2038
    Subdaemon       86329   0xd1d00468  AsyncMV                        2041
    Subdaemon       86329   0xd1e00468  Monitor                        2034
    Subdaemon       86329   0xd2000468  Aging                          2040
    Subdaemon       86329   0xd2200468  Checkpoint                     2035
    Replication policy  : Always
    Replication agent is running.
    Cache Agent policy  : Manual
    Summary of Perm and Temp Sizes of each system. 
    PermSize=100
    TempSize=50
    PermSize=100
    TempSize=50
    PermSize=64
    TempSize=32
    PermSize=1850    => Subscriber
    TempSize=35     => Subscriber
    PermSize=64
    TempSize=32
    PermSize=200
    TempSize=75
    [SubscriberDir]
    Driver=/opt/SANTone/msc/active/TimesTen/lib/libtten.so
    DataStore=/Database/db/Subscriber
    AutoCreate=0
    DurableCommits=0
    ExclAccess=0
    LockLevel=0
    PermWarnThreshold=80
    TempWarnThreshold=80
    PermSize=1850
    TempSize=35
    ThreadSafe=1
    WaitForConnect=1
    Preallocate=1
    MemoryLock=3
    ###MemoryLock=0
    SMPOptLevel=1
    Connections=64
    CkptFrequency=300
    DatabaseCharacterSet=TIMESTEN8
    TypeMode=1
    DuplicateBindMode=1
    msclab3201% cat ttendaemon.options
    -supportlog /var/ttLog/ttsupport.log
    -maxsupportlogsize 500000000
    -userlog /var/ttLog/userlog
    -maxuserlogsize 100000000
    -insecure-backwards-compat
    -verbose
    -minsubs 12
    -maxsubs 60
    -server 16002
    -enableIPv6
    -linuxLargePageAlignment 2
    msclab3201# cat /proc/meminfo
    MemTotal:       66002344 kB
    MemFree:        40254188 kB
    Buffers:          474104 kB
    Cached:         19753148 kB
    SwapCached:            0 kB
    HugePages_Total:
    2000
    HugePages_Free:
    2000
    HugePages_Rsvd:   
    0
    HugePages_Surp:   
    0
    Hugepagesize:  
    2048 kB
    ## Before loading Subscriber Dsn
    msclab3201# ipcs -m
    ------ Shared Memory Segments --------
    key        shmid      owner      perms      bytes      nattch     status
    0xbc0101d6 1703411712 ttadmin    660        1048576    1
    0x79010649 24444930   root       666        404        0
    ## After loading Subscriber Dsn
    msclab3201# ipcs -m
    ------ Shared Memory Segments --------
    key        shmid      owner      perms      bytes      nattch     status
    0xbc0101d6 1703411712 ttadmin    660        1048576    2
    0x7f020012 1825964033 ttadmin    660        236978176  2
    0x79010649 24444930   root       666        404        0
    msclab3201#
    msclab3201# sysctl -a  | grep huge
    vm.nr_hugepages = 2000
    vm.nr_hugepages_mempolicy = 2000

    The size of these databases is very close to the limit for 32-bit systems and you are almost certainly running into address space issues given that 11.2 has a slightly larger footprint than 6.0. 32-bit is really 'legacy' nowadays and you should move to a 64-bit platform as soon as you are able. That will solve your problems. I do not think there is any other solution (other than reducing the size of the database).
    Chris

  • How to create a Macro in excel to store the excel data to Oracle Database

    Hi All
    Does anyone has created a macro in excel which on being run stores the excel data to Oracle database. In my project I need to create one such macro for updating oracle database with excel data and another for inserting excel records.
    I tried doing this using a macro in MS access but Client wants its to be done using Excel Macro only.
    Any help would be highly appreciated.
    Thanks in advance..
    Shikha

    Please read Chapter 19.7 Creating Selection Lists (http://download.oracle.com/docs/html/B25947_01/web_complex007.htm#CEGFJFED) of the Oracle® Application Development Framework Developer's Guide For Forms/4GL Developers 10g Release 3 (10.1.3.0)
    Cheers,
    Mick.

  • How to store numeric format data in a database

    In order to properly format a report generated from data stored in a database using a TestStand schema,
    I would like to add formating information for numeric values to the database.
    My intent was to store the numeric format string data in a separate column in the MEAS_NUMERICLIMIT table in the database.
    By using this format string I can then format the numeric values in my report.
    I have successfully retrieved the numeric format string by calling the 'NI TestStand API 3.0', using the ActiveX/COM adapter.
    In the 'PropertyObject' class there is an action called 'Get Property'.
    This action can retrive the 'NumericFormat' property for a given object reference.
    The problem is that I don´t know HOW to do this in the dat
    abase logging schema.
    Can I use this method in the API to retrive and store the numeric format string in the database??
    Or is there any other way of achieving this functionality?
    All ideas for solutions are appreciated.
    Thanks in advance!

    Yes you can. I think it would be helpful if you explain in more detail what you are trying to do.
    >>>> Basically I am trying to reproduce the data sheet created by test stand by using the data in the database.
    Are you using an NI default schema or have you already customized it?
    >>>> I already have a custom schema that I created many years ago, But if I have to start with a 'newer' default schema it wouldn't be to much of a problem to incorporate my changes into it. (I had added Model number and Comment to UUT result table and provided support for custom step types, the custom step types are based on the default NumericLimit step type )
    If default, what about the schema is insufficient for what you want to do?
    >>>> In order to generate a datasheet from the data in the database that replicates the datasheet produced by teststand, I need the Formatted values for the test results and the test limits. So I'm thinking it would be easier for me to query the database for the formatted numbers (as strings) instead of having to query the database for the 'numeric value' and the 'format string' and then creating the string for my datasheet.
    Is the data and limits that you are trying to log custom properties or or is this for the NI numeric or multi-numeric step type?
    >>>> No using custom properties, just dealing with 'NumericLimit' step types
    I had looked at how the 'SequentialModel.Seq' calls the modelsupport2.dll to  to produce the data sheet entries.
         ProcessModelPostResultListEntry >
         Process Step Result >
         Get Step Result Body (Sequence) >
         Add Flagged Values >
         modelsupport2.dll >
         GetFlaggedValuesForReport_Html
    But, alas, I don't understanding the whole traversing concept.

  • When / why use XML to store data instead of database table ?

    Hi All,
    I still not use XML much in applications and don't know much about its utilization.
    I read here and there about storing data as XML instead of into database tables.
    - could any body please tell me when / why use XML to store data instead of database table ?
    e.g : store inventory per warehouse in XML format. ?
    - What is the other cases or reasons of extracting database records into XML or vice versa ?
    - is there any good pdf on this ?
    Thank you for your help,
    xtanto

    It depends entirely what you want to accomplish with the 'XML in the database'. There are basically 3 independent methods: As CLOB, as XMLType views or as native XMLType 'columns'
    Each method has advantages and disadvantages, especially in the performance vs purpose tradeoff.
    The Oracled Press book "Oracle Database 10g XML & SQL Design, Build, & Manage XML Applications in Java, C, C++, & PL/SQL" is highly recommended for anyone interested in Oracle and XML. http://books.mcgraw-hill.com/getbook.php?isbn=0072229527&template=oraclepress

  • Unable to load data store in a new model

    Hi,
    I have Win XP Pro SP3. MS SQL 2008 which has adventure works DW2008R2 database. I have oracle data integrator.
    I have created a physical and logical schema and have established a connection with my MS SQL 2008 and the test connection is successful. I create a new model folder and a new model within. In the new model, I gave technology as microsoft sql server , logical schema name selected, and in reverse tad: standard, context:global and when i click on "reverse" no tables with are seens under the new model.
    no error message either. I have been trying to figure this out for the last 12 hrs...can someone please suggest/guide me here please. this is my first time using ODI.
    Goo

    Hi,
    Thanks for the reply. I thread you provided gives details about how to get connected. But as i mentioned earlier, i can connect. I am just not able to bring in data store...
    Any help will be appreciated. I can send the screen shot if you would like.
    Goo

  • What do you recommend to use as an offline data store, since SQL CE support is not in VS 2013?

    A few years back I was architecting an occasionally connected .Net desktop application. 
    VS 2010 was offering full support for Microsoft Sync Framework and SQL CE with Entity Framework. 
    This seemed like the perfect marriage, so I ran with it, and the resulting software solution is still successfully running in production, years later. 
    Jump forward to today, and I am architecting a new occasionally connected .Net desktop application. 
    I was really looking forward to taking advantage of the advances made by Microsoft in using the tools built into VS 2013. 
    However, what I discovered has dumbfounded me.  VS 2013 has no designer support for Sync Framework, and worse, built in support for SQL CE has been completely removed, including the ability to generate Entity Framework models from a
    CE database using the designer. 
    My question to the community is, what tools should I be using to solve the problem of offline storage in my brand new .Net application? 
    I am aware of ErikEJ’s SQL Server Compact Toolbox, which brings back some support for these features in VS 2013, but it is not as fully featured as the VS 2010 native support was, plus it does not have the institutional “Microsoft” stamp on it. 
    I am building a multimillion dollar corporate solution that I will have to support for many years.
     I would like to have some comfort that the technologies I select, today, will still be supported 5 years from now, unlike the way Microsoft has discontinued supporting Sync Framework and CE in the most recent VS. 
    I can accept open source technologies, because there is a community behind them, or off the shelf corporate solutions, since they will be driven by financial gain, but I have trouble committing to a solution that is solely supported by an individual,
    even if that person is a very talented Microsoft MVP.
    Some of the features of SQL CE that I would like to keep are
    Built in encryption of the file on disk
    Easy querying with an ORM, like Entity Framework
    Tools to easily sync up the offline data store with values from SQL Server (even better if this can be done remotely, such as over WCF)
    Does not require installation of additional software on the client machine, as SQL Express would
    Please, provide your feedback to let me know how you have achieved this, without resorting to simply using an older version of VS or Management Studio. 
    Thank you.

    Hello,
    Based on your description, you can try to use SQL Server 2012 Express LocalDB.
    LocalDB is created specifically for developers. It is very easy to install and requires no management, but it offers the same T-SQL language, programming surface and client-side providers as the regular SQL Server Express.
    SQL Server LocalDB can work with Entity Framework and ADO.NET Syc Framework. However, there is no built-in encryption feature in LocalDB which
    can let you encrypt database. You should decrypt/encrypt data on your own, for example, using
    Cryptographic Functions
    Reference:SQL Express v LocalDB v SQL Compact Edition
    Regards,
    Fanny Liu
    If you have any feedback on our support, please click here.
    Fanny Liu
    TechNet Community Support

  • Different ways to Transfer data from one database to another database

    Hi all,
    What are the ways to transfer data from one database to another database. With the following options, i Can transfer data as far as i know. Please
    correct me if i am wrong or tell me if there is any other options are available.
    1) Create database link/connection string and using this string and COPY command, we can transfer data.
    2) By using Export and Import utilities.
    I told first one to my interviewer, he told, its strange, by using, COPY command also can we transfer data ? As far as i know, we can transfer data. Am i right ?
    Thanks in advance,
    Pal

    transfer data from one database to another database.You mean store the data of one to another?
    1) Create database link/connection string and using this string and COPY command, we can transfer data.every SELECT on a DB-link is transfering data. And you can have all kind of transfers and store on the e.g CTAS of materialized views or.... the SQL*PLUS COPY :
    The COPY command is not being enhanced to handle datatypes or features introduced with, or after Oracle8i. The COPY command is likely to be made obsolete in a future release.
    But there are many others. Check for ORACLE Streams, and the "COPY" your interviewer was mentioning is about the operating file system COPY right? That's transportable tablespaces.
    http://download.oracle.com/docs/cd/E11882_01/server.112/e17120/tspaces013.htm#ADMIN11403
    -- andy

  • Uploading spreadsheet data into the database

    Hi
    I want to upload the spreadsheet data into the database through front end...I dont have any idea how to do upload without using the 'utilities' option..Can anyone please help me to do this?
    Thanks in advance
    Fazila

    Hi
    I refered the example sent by vikas...but i could not understand..I dont need to specify table name in runtime...my requirement is that I will have the constant table(say MD look up table)...and I will have some data under the column heading( say repid,split name)...
    Now I want to import my spreadsheet data which are under the heading repid and split name through my front end application and I have the option whether to 'overwrite' the records or 'append' the new records...after clicking the necessary option..I want to import my spread sheet data into the table defined already...and my another requirement is that I want to check the duplication of data between the spreadsheet and table...If I find the duplicates, I have to omit it and store the remaing details....
    Please give me some guidelines to solve this problem....
    Thanks in advance
    Fazila

  • Character integrity issue after data conversion in database/JDBC

    Hi
    I am using oracle 9i with the following NLS setting:
    NLS_LANGUAGE :AMERICANS
    NLS_CHARACTERSET : UTF8
    NLS_NCHAR_CHARACTERSET :AL16UTF16
    I am running on Linux with this as my environment Language:
    Lang: en_US.UTF8
    I am sending hindi characters in XML file (UTF-8 encoding) to my java application to be stored in the database. In my xml file, I give this encoding (ignore the double quotes, reason for putting in the quotes so that the browser will not interpret it)
    "&#x928";"&#x92E";"&#x938";"&#x94D";"&#x924";"&#x947"
    But the characters appeared unreadable in the database. When I use Select DUMP to check the characters encoding:
    Typ=1 Len=12 CharacterSet=UTF8: 0,28,0,2e,0,38,0,4d,0,24,0,47
    When I retrieve data from the database via my application, the weird characters will appear.
    However, if i manually input the hindi characters into the column of the table, then the Hindi characters appear correctly. When I do a DUMP to check, this is what I get:
    Typ=1 Len=12 CharacterSet=UTF8: 9,28,9,2e,9,38,9,4d,9,24,9,47
    When I check the unicode chart here http://www.unicode.org/charts/PDF/U0900.pdf, the second DUMP result is correct. When I retrieve data from the database via my application, the correct hindi string appear.
    I understand that in Java the encoding is in UTF-16 and Oracle JDBC will convert from UTF-16 to UTF-8 before storing in my database and vice versa. The thing that puzzles me is why correct hindi string appears on my web interface when that the same conversion is used to extract the data from the database. At first I suspect it is the conversion problem in JDBC when the UTF-16 characters get truncated to UTF-8 when I try to store the data to database. But when good data is stored in the database, the extraction seems to be correct albeit that it is going through the same conversion.
    I read from several threads of this forum and also the Oracle Globalization Support article but I cannot find an answer to my question.
    Can anyone help? Thanks.
    Edited by: user13085722 on May 10, 2010 1:12 AM
    Edited by: user13085722 on May 10, 2010 1:16 AM

    A couple of checkpoints for you:
    1. When you load the XML from SXMB_MONI in the test tab of message mapping it turns red..this means the constructed XML (from CC content conversion) doesnt match the one (XSD) defined in your ESR/IR. In this case you have to check again thoroughly the file content conversion fields values/field length in the sender Communication chaneel.
    2. Once you rectify the error above then you can test the mapping in ESR message mapping.

  • How to select from multiple tables which reside on different data stores ?

    Suppose I have two data stores in one TimesTen instance:
    1) Datastore A:
    table1
    2) Datastore B:
    table2
    I want to make a query like this:
    select ... from table1, table2 where table1.colA = table2.colB
    Can I ? If not, is there a workaround ?
    BTW, because of business, we have to use two or more different datastores, so we can not put table1/table2 in the same datastore.
    Thanks very much.

    You can query multiple TimesTen databases, but your original question was about joining tables from two databases, which is not supported.
    Using Cache Connect to Oracle to query an Oracle database is not distributed. It's still one single Oracle database you are querying. You cannot join a table in the TimesTen database with a table in the Oracle database, this is not allowed.
    If you are willing to share your business requiremens, we can take a look and see what solution might work for you. Would you like to discuss this offline?
    Susan

  • How to Set a Variable with data from Srouce Data Store

    Hello ODI Experts,
    I have created a Physical & Logical Schema and a Source Data store to pickup data from a database table.
    On the other hand, I have a few variable that I will pass in a web service call (ODIInvokeWebService tool).
    Would yo please guide how I can set variables from my source data store.
    Thanks & Regards,
    Ahsan

    Hello Bos/Damodhar/ODI Experts,
    Doesn't it gives me a less optimized approach picking one column per query (per variable)?
    Lets say, I have to pick 35 columns from a table and put those in 35 variables...It would mean running 35 queries for fetching one record from the database table.
    Doesn't it seem less performance effective (less optimized)..a little scary..any thing better that I can do to make it more optimized?
    Another question, what if multiple new values have come in the DB table, since I am using Refresh Variable, would this variable have multiple values in it?
    Thanks for all your help,
    Ahsan
    Edited by: Ahsan Asghar on 21-Jun-2011 07:46

  • Persistence data store...how to

    Greetings!
    I have a JMS application that I am developing using durable subscribers connecting to my Topic. Everything works like a charm, so now I want to extend capability ( aka, break my application =P ). I've read a bunch of documentation that says JMS has the capability to store these messages to a flat file or a database, but that's the extent of the documentation I can find.
    I am wondering if, specifically, someone can tell me HOW do I configure where the messages get stored. Do I have to write code to store these messages to a database or is this functionality implicit within my application server (WebSphere 5)?
    If someone could explain this voodoo magic to me or point me to a doc that explains it, I would be greatly appreciative!
    Thanks in advance!
    Matt,
    JMS n00b

    Matt
    If I understand correctly .. what you need is a functionaltity to LOG all the messages being transferred on the JMS Server to a data store (RDBMS or File)
    If yes, what all JMS Servers provide in case of Durable subscribers is the temp storage of messages in the data store till the message is received by the receiver to ensure gauranteed message delievery.
    These messages are deleted from the data store once they are delievered to the subscriber.
    In order to achieve Logging like functionality you will need to built a custom application ( a message consumer) which reads messages from the destination (topic/queue) and either writes to the file or using JDBC writes into the database.

  • Using JSP to write data to MySql database

    Please help. I am trying to develop a website where a user registers by filling details required onto a page this data is then posted onto another page and displayed to user the user can the store this data into the database if they are satisfied with it. The problem is although this data is displayed on the next JSP page when I click on save the data is not written to my database.
    Code below the problem is with datasave.jsp
    Register.jsp:
    <html>
    <body bgcolor="#d0d0d0">
    <style type ="text/css">
    @import "style.css"; </style>
    <head>
    <script src="form_functions.js" type="text/javascript"></script>
    <script type="text/javascript">
    function validateForm()
         errorMessage = "The following field(s) require your attention:";
         hasErrors = false;
         newline = "\n - ";
         if( isInvalidEmail( form1.email.value ) )
              errorMessage += newline + "Email :: must contain a valid email address";
              hasErrors = true;
         if( isEmpty( form1.Firstname.value ) )
              errorMessage += newline + "Firstname :: must not be empty";
              hasErrors = true;
    if( isEmpty( form1.Lastname.value ) )
              errorMessage += newline + "Lastname :: must not be empty";
              hasErrors = true;
         if( isNotInteger( form1.phone.value ) )
              errorMessage += newline + "Phone :: must consist of numbers";
              hasErrors = true;
    if( isEmpty( form1.Address.value ) )
              errorMessage += newline + "Address :: must not be empty";
              hasErrors = true;
         if( isEmpty( form1.City.value ) )
              errorMessage += newline + "City :: must not be empty";
              hasErrors = true;
         if (!document.form1.accept[1].checked)
         errorMessage += newline + "Please accept condition to continue";
              hasErrors = true;
         if( hasErrors )
              alert( errorMessage );
              return false;
         else
              return true;
    </script>
    </head>
    <body>
    <p>
    <body>
    <script src="dateLastUpdated.js"
              type="text/javascript">
    </script>
    <p><h1>REGISTER YOUR DETAILS FOR YOUR BUYANDSELL ACCOUNT</h1></p>
    <!-- ************* start of form **************** -->
    <form
         name="form1"
         method="POST"
         action="datasave.jsp"
         onSubmit="return validateForm();"
         >
    <p>
         Email:
         <input type="text" name="email"/>
         </p>
    <p>
         Password:
         <input type="password" name="Password"/>
         </p>
    <p>
         Firstname:
         <input type="text" name="Firstname"/>
         </p>
    <p>
    LastName:
         <input type="text" name="Lastname"/>
         </p>
    <p>
    Phone:
         <input type="text" name="phone"/>
         </p>
    <p>
    Address:
         <input type="text" name="Address"/>
         </p>
    <p>
    City:
         <input type="text" name="City"/>
         </p>
    <p>
         Country:
         <select name="country">
              <option value="Eire">Republic of Ireland </option>
              <option value="Northern Ireland">Northern Ireland </option>
         </select>
         </p>
    <p>
    Terms and Conditions:
    If you accept the Terms and Conditions - please click on "I accept" at the end of this
    document.
    1. GENERAL
    This website is owned and operated by B&S Limited, trading as BuyandSell ("BuyandSell")
    whose head office is at BuyandSell House, Argyle Square, Donnybrook, Dublin 4. For the
    purpose of these terms and conditions "we", "our" and "us" refers to BuyandSell.
    <input type=radio checked name="accept" value="0"> I do not accept<br>
    <input type=radio name="accept" value="1">I have read and I accept the Terms and
    Conditions
    </P>
    <p>
              <input type="submit" value="Contact Details"/>
         </p>
    </form>
    <!-- ************* end of form **************** -->
    <centre>
    <script language="JavaScript1.3">
         // run script
         dateLastUpdated();
    </script>
    </body> </html>
    datasave.jsp:
    <html>
    <style type ="text/css">
    @import "style.css"; </style>
    <HEAD>
    </script>
    </HEAD>
    <p><h1>CREATE YOUR BUYANDSELL USER ACCOUNT</h1></p>
    </P class= "links">
    <body>
    <%-- Set the scripting language to Java and --%>
    <%-- Import the java.sql package --%>
    <%@ page language="java" import="java.sql.*"%>
    <%-- -------- Open Connection Code -------- --%>
    <%
    /* Note: MySQL is accessed through port 3306. NAIJA is the name of the database */
         String connectionURL = "jdbc:mysql://localhost:3306/buyandsell";
         Connection connection = null;
         Statement statement = null;
    ResultSet rs = null;
    try {
    // Load SQL Server class file
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    // Make a connection to the Mysql
    connection = DriverManager.getConnection(connectionURL, "root", "");
    %>
    <%-- -------- INSERT Code -------- --%>
    <%
    String action = request.getParameter("action");
    // Check if an insertion is requested
    if (action != null && action.equals("insert")) {
    // Begin transaction
    connection.setAutoCommit(false);
    // Create the prepared statement and use it to
    // INSERT the registration attributes INTO the registration table.
    PreparedStatement pstmt = connection.prepareStatement( "INSERT INTO registration(email,Password,Firstname,Lastname,phone,Address,City,Country) VALUES(?,?,?,?,?,?,?,?)");
                   pstmt.setString(1, request.getParameter("email"));
                   pstmt.setString(2, request.getParameter("Password"));
    pstmt.setString(3, request.getParameter("Firstname"));
                   pstmt.setString(4, request.getParameter("Lastname"));
                   pstmt.setDouble(
    5, Double.parseDouble(request.getParameter("phone")));
                   pstmt.setString(6, request.getParameter("Address"));
                   pstmt.setString(7, request.getParameter("City"));
    pstmt.setString(
    8, request.getParameter("Country"));
    int rowCount = pstmt.executeUpdate();
    // Commit transaction
    connection.commit();
    connection.setAutoCommit(true);
    %>
    <p>
    <p>
    <form
                        NAME="data"
                        action="Login.html" method="post">
    <input type="hidden" value="insert" name="action">
    </p>
    Email:
         <strong>
         <%= email %>
         </strong>
    <p>
    Firstname:
         <strong>
         <%= Firstname %>
         </strong>
    </p>
    <p>
    Lastname:
         <strong>
         <%= Lastname %>
         </strong>
    </p>
    <p>
    Phone no:
         <strong>
         "<%= phone %>"
         </strong>
    </p>
    <p>
    Address:
         <strong>
         <%= Address %>
         </strong>
    </p>
    <p>
    City:
         <strong>
         <%= City %>
         </strong>
    </p>
    <p>
    Country:
         <strong>
         <%= Country %>
         </strong>
    </p>
    <p>
    <input type="submit" value="SAVE">
    </form>
    </p>
    <%-- -------- Close Connection Code -------- --%>
    <%
    // Close the ResultSet
    rs.close();
    // Close the Statement
    statement.close();
    // Close the Connection
    connection.close();
    } catch (SQLException sqle) {
    out.println(sqle.getMessage());
    } catch (Exception e) {
    out.println(e.getMessage());
    %>
    </body>
    </html>

    Hi,
    I think in place of buyandsell put NAIJA
    String connectionURL = "jdbc:mysql://localhost:3306/NAIJA ";

Maybe you are looking for