Howto initialize JPA attribute with database sysdate?

Hi,
we have the problem that we are required to initialize a "created" attribute of our TopLink JPA POJOs with the current SYSDATE of the Database (as there is a time difference between Application Server and Database Server). For this reason, we cannot simply set the value in the constructor of the Java object.
Is there any approach to solve this issue?
regards,
hans

In general be careful in doing this if you are concerned with performance, as accessing the database for the current time can be expensive. Normally the Application Server time should be sufficient.
You have a few options for accessing the database time.
- You could query the SYSDATE from the database in your application code when you create your object.
- You could use a TopLink or JPA insert event to query the SYSDATE from the database to populate your object.
- If you are using TopLink you could use the ReturningPolicy to access the "created" field from the database on insert, and assign the field in the database table using a trigger. The ReturningPolicy is only available in TopLink, not TopLink Essentials.

Similar Messages

  • HowTo: Comparison CVS checkout with Database Schema [functions, procedures]

    Dear Team,
    Requirement: Compare & update the latest scripts from CVS/repository directly into Oracle Schema, for stored functions, packages, stored procedures, views etc respectively.
    Currently using Oracle 9/10 with SQL Developer 2.1 supports with CVS. However unable to compare the schema with the CVS checkout scripts. Does this facility is provided? If not any other alternative (exclusidng the manual comparison of the scripts), respectively.
    Thank you in advance!

    This question is off-topic in "Database - General."
    As it relates only to SQL*Developer post it there.

  • Help with Retrieve attributes from database

    Hi,
    I'm using filter "Retrieve from or write to database" with select query from database by selecting attributes as column names radio button.
    I'm unable to get these user attributes with column names.
    For eg : select tag from test_tag where rownum=1;
    I was trying so that result can be used using tag attribute (${tag}).
    Please help in this regard.
    Thanks,
    Vani

    Hi Vani,
    After the retrieve filter, add a Trace Filter and leave it as it is. Execute the policy once and in the trace data that now will be displayed there you should be able to read out the exact name and type of the parameter. This way of identifying data/parameters etc is a recommended way of working while developing! Copy paste the Trace Data from the Trace filter here if you need help!
    Cheers,
    Stefan

  • Synchronize with database problem

    Hi,
    I'm using JSF ADF BC, I have two tables in database, I've added new field to each, I go back to jdeveloper, and right click on both entities and click on synchronize with database, select new field that I've created and everything works fine, then I go to view object and here is the problem, in first view object I can add newly created and synchronized field like supposed (mapped to column or sql), but in the second view no matter what I do it is alway created as transient, I've tried deleting and synchronizing couple of times, changing properties, going to view row impl, view.xml, but it's always the same problem. Please can anyone help, I don't want to create whole view from scratch, every association, view link etc.
    Thanks in advance,
    Tomislav

    Hi,
    on view object editor screen, put your cursor on "Attributes" (left side of the screen) then click "NEW" button (on the right side of the screen), then fill in Attribute Name, check the "Map to column or SQL", and fill in query column. You are done.

  • ADF BC Attribute with VC of CONTAINS Ignores Choice List on the LOV

    JDev 11g PS 1.
    Objects:
    - A view criteria with attribute defined as CONTAINS (literal)
    - An LOV on that attribute with a default list type UI hint of Choice List
    - ADF Faces query-table based in the VC
    Problem: query-table ignores the Choice List and renders an Input Text.
    Clue: Changing the operator to EQUALS causes the expected Choice List to be rendered in ADF BC.
    If this is documented in the online help or in this forum, it is escaping me.
    Anyone know the best workaround? Set the VC using EQUALS and switch it to CONTAINS in buildWhereClause() maybe?
    Thanks,
    Peter

    Frank,
    Thanks for the fast reply and for the bug entry. Unfortunately stopping work is not an option. We've come up with a solution using a query listener that replaces EQUALS with CONTAINS before the query and resets it to EQUALS after the query (otherwise the component draws the text item after the query).
    Maybe you can think of another solution to our requirement: display a single master record in the results table for a master-detail database view. For example, in an altered Oracle HR world, each DEPARTMENTS record is associated with multiple LOCATIONS records (through a DEPT_LOC table). A database view, DEPT_LOC_VW, based on that table also contains the location description and department description.
    Users want to select and then edit (on another page) a department by querying by location. If we represent DEPT_LOC_VW in the query-table component, we see multiple result rows for a single department and that is unnecessary confusion for the purpose of editing a single department.
    So we have created an alternative database view, DEPT_VW, based on DEPARTMENTS only, with an additional column -- LOC_LIST -- based on a function that returns a delimited list of all location codes for that department. This way, the user sees only one department record in the results table (although we lose the location description in the results -- not an issue) and is still able to query based on location.
    A LOCATIONS_VW view contains the location code surrounded with the delimiiter. The DeptVw view attribute LocList contains an LOV based on that database view.
    We want the view criteria to create a query condition:
    WHERE loc_list LIKE '%'||<selected location code>||'%'We thought about some kind of clever use of a subquery using a bind variable:
    SELECT...
    FROM  departments -- not DEPT_VW or DEPT_LOC_VW
    WHERE department_id IN (
       SELECT department_id
       FROM   dept_loc
       WHERE  location_id = NVL(:userSelectedLocationId, location_id);But that bind variable does not show in the view criteria selection list so it will not appear in the query component.
    Thanks again,
    Peter

  • ERROR http: 5: Unable to initialize ssl connection with server, aborting co

    HI EXPERTS,
    one of my database give me below error when i start its dbconsole. and after failure it give me meassge
    TZ set to Asia/Karachi
    Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
    Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
    https://test:5500/em/console/aboutApplication
    Starting Oracle Enterprise Manager 10g Database Control ..............................................................
    ........ failed.
    Logs are generated in directory /u01/oracle/product/10.2/cnichol_cpuplt/sysman/log
    and in trace file name "emdctl.trc" below error is logged.
    ERROR http: 5: Unable to initialize ssl connection with server, aborting connection attempt
    ERROR ssl: nzos_Handshake failed, ret=29024
    and trace file named "emagent.trc" give below error
    2010-10-04 19:12:25 Thread-88238992 ERROR http: 11: Unable to initialize ssl connection with server, aborting connection attempt
    2010-10-04 19:12:25 Thread-88238992 ERROR pingManager: nmepm_pingReposURL: Cannot connect to https://test:5500/em/upload/: retStatus=-1
    2010-10-04 19:12:38 Thread-88238992 ERROR upload: Error in uploadXMLFiles. Trying again in 300.00 seconds.
    dbconosle URL is
    https://test:5500/em/console/aboutApplication
    Operating system is Redhat linux AS 5.3
    what is the possible cause of this failure any one can guide me.
    thanx in Advance
    regards,
    Edited by: AMIABU on Oct 4, 2010 7:28 AM

    oracle@bcm-laptop:~$ emctl
    Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
    Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
       Oracle Enterprise Manager 10g Database Control commands:
            emctl start | stop dbconsole
            emctl status | secure | setpasswd dbconsole
            emctl config dbconsole -heap_size <size_value> -max_perm_size <size_value>
           emctl status agent
           emctl status agent -secure [-omsurl <http://<oms-hostname>:<oms-unsecure-port>/em/*>]
           emctl getversion
           emctl reload | upload | clearstate | getversion agent
           emctl reload agent dynamicproperties [<Target_name>:<Target_Type>]....
           emctl config agent <options>
           emctl config agent updateTZ
           emctl config agent getTZ
           emctl resetTZ agent
           emctl config agent credentials [<Target_name>[:<Target_Type>]]
           emctl gensudoprops
           emctl clearsudoprops
    Blackout Usage :
           emctl start blackout <Blackoutname> [-nodeLevel] [<Target_name>[:<Target_Type>]].... [-d <Duration>]
           emctl stop blackout <Blackoutname>
           emctl status blackout [<Target_name>[:<Target_Type>]]....
    The following are valid options for blackouts
    <Target_name:Target_type> defaults to local node target if not specified.
    If -nodeLevel is specified after <Blackoutname>,the blackout will be applied to all targets and any target list that follows will be ignored.
    Duration is specified in [days] hh:mm
            emctl getemhome
            emctl ilint
    Em Key Commands Usage :
    emctl config emkey -emkeyfile <emkey.ora path> [-force] [-sysman_pwd <sysman password>]
    emctl config emkey -emkey [-emkeyfile <emkey.ora path>] [-force] [-sysman_pwd <sysman password>]
    emctl config emkey -repos [-emkeyfile <emkey.ora path>] [-force] [-sysman_pwd <sysman password>]
    emctl config emkey -remove_from_repos [-sysman_pwd <sysman password>]
    emctl config emkey -copy_to_repos [-sysman_pwd <sysman password>]
    emctl status emkey [-sysman_pwd <sysman password>]
    Secure DBConsole Usage :
    emctl secure dbconsole -sysman_pwd <sysman password> [-passwd_file <abs file loc>]
         [-host <slb hostname>] [-sid <service name>] [-reset] [-secure_port <secure_port>]
         [-root_dc <root_dc>] [-root_country <root_country>] [-root_state <root_state>] [-root_loc <root_loc>]
         [-root_org <root_org>] [-root_unit <root_unit>] [-root_email <root_email>]
         [-wallet <wallet loc>] [-wallet_pwd <wallet pwd>] [-trust_certs_loc <certs loc>]
    emctl secure status dbconsole
    Register Targettype Usage :
    emctl register oms targettype [-o <Output filename>] <XML filename> <rep user> <rep passwd> <rep host> <rep port> <rep sid> OR
    emctl register oms targettype [-o <Output filename>] <XML filename> <rep user> <rep passwd> <rep connect descriptor>

  • Commit of master-detail view with database trigger on update

    [ADF Jdev11 question]
    My case is the following:
    I have master form, with detail table attatched to it (using view link).
    On update of master table, there is a database trigger which makes changes in the detail table.
    As commit action commits both of the tables, as a result, I get the following exception:
    "Another user has changed the row with primary key oracle.jbo.Key[000000002017 ]. "
    Do you have any suggestions how can I fix this? Is there a way I can refresh the detail table just after the commit of the master table?
    Marking the updated attributes with "refresh after update" doesn't help at all.

    This trigger is on update of the master table and that is what it does:
    BEGIN
    UPDATE detail_table
    SET smolotpr = :NEW.molotpr,
    smolpol = :NEW.molpol,
    spoluch = :NEW.poluch,
    sotpr = :NEW.otpr,
    SMAKET = :NEW.MAKET,
    sdata_period = :NEW.data_period
    WHERE doknom = :NEW.doknom;
    END;
    Setting the updated attributes "Refresh after update+insert" to true doesn't help at all (maybe because they are in another table)!
    I will be very grateful if you give me any ideas, advice or give the complete solution!

  • JPA cascade with  @GeneratedValue(strategy=GenerationType.IDENTITY)

    If anyone has got cascading persistance working in JPA with database generated primary keys I'd be much obliged if you could let me know how.
    Am attempting to use tables with database auto generated primary keys (MySQL AUTO_INCREMENT), and using the JPA cascade features. But I can't see how to make it work.
    The problem is that if you cascade persist a series of entities, you need to know the database primary keys before you persist to the database.
    If I remove all the cascades in my @entity's, and explicitly persist entities in the correct order so the primary keys are set before them being needed, then all is ok.
    When I put the cascades in, my JPA implementation (Toplink) attempts to create the entities with foreign keys to tables with the yet to be generated primary keys all null. I was hoping JPA/Toplink would be clever enough to persist the entities in order, setting the database generated primary keys as it went.
    Has anyone tried this in Hibernate?
    Sampe code exerts that does not work:
    @Entity
    public class Address implements Serializable {
       private long id;
       private Collection<Contact> contacts = new ArrayList<Contact>();
       @OneToMany(cascade = { CascadeType.ALL })
       public Collection<Contact> getContacts() {
          return contacts;
    @Entity
    public class Contact implements Serializable {
       private long id;
       @Id
       @Column(updatable = false)
       @GeneratedValue(strategy = GenerationType.IDENTITY)
       public long getId() {
          return this.id;
    CREATE TABLE address (
           id BIGINT NOT NULL AUTO_INCREMENT
         , address_line_1 VARCHAR(64)
         , address_line_2 VARCHAR(64)
         , address_line_3 VARCHAR(64)
         , suburb VARCHAR(64)
         , postcode VARCHAR(16)
         , state VARCHAR(64)
         , country_code CHAR(2)
         , PRIMARY KEY (id)
    CREATE TABLE contact (
           id BIGINT NOT NULL AUTO_INCREMENT
         , address_id BIGINT
         , contact_type CHAR(10)
         , value VARCHAR(255)
         , PRIMARY KEY (id)
         , INDEX (address_id)
         , CONSTRAINT FK_contact_address FOREIGN KEY (address_id)
                      REFERENCES address (id)
    );

    The way I have it, the contact does need annotations as it is a bidirectional link. The contact defines the link and the address has a mappedBy="address".
    If you remove the annotations on contact, I think you will need to set up a unidirectional one-to-many link and my 'text book' says you need to have a join table to implement this. I tried all kinds of ways to have a unidirectional one-to-many link without a join table, but never succeeded.
    I found if a persist failed it would still use up sequence numbers (Hibernate and MySQL), but I did not come accross your problem. I found it useful to look on the SQL Database logs to see exactly what SQL was getting to the server.
    My code - so far working fine, am in mid development though.
    Address.java:
    @Entity
    @Table(name = "address", schema = "z")
    public class Address implements Serializable {
       private static final long serialVersionUID = 1L;
       private long id;
       private String addressLine1;
       private Collection<Contact> contacts = new ArrayList<Contact>();
       public Address() {
          super();
       @Id
       @Column(updatable = false)
       @GeneratedValue(strategy = GenerationType.IDENTITY)
       public long getId() {
          return this.id;
       public void setId(long id) {
          this.id = id;
       @Column(name = "address_line_1")
       public String getAddressLine1() {
          return this.addressLine1;
       public void setAddressLine1(String addressLine1) {
          this.addressLine1 = addressLine1;
       @OneToMany(mappedBy="address", cascade={CascadeType.ALL})
       public Collection<Contact> getContacts() {
          return contacts;
       public void setContacts(Collection<Contact> contacts) {
          this.contacts = contacts;
    Contact.java:
    @Entity
    @Table(name = "contact", schema = "z")
    public class Contact implements Serializable {
       private static final long serialVersionUID = 1L;
       private long id;
       private Address address;
       private String value;
       private String contactType;
       public Contact() {
          super();
       @Id
       @Column(updatable = false)
       @GeneratedValue(strategy = GenerationType.IDENTITY)
       public long getId() {
          return this.id;
       public void setId(long id) {
          this.id = id;
       @ManyToOne (cascade={CascadeType.ALL})
       @JoinColumn(name="address_id", referencedColumnName="id", nullable=false, updatable=false)
       public Address getAddress() {
          return this.address;
       public void setAddress(Address address) {
          this.address = address;
       public String getValue() {
          return this.value;
       public void setValue(String value) {
          this.value = value;
       @Column(name = "contact_type")
       public String getContactType() {
          return this.contactType;
       public void setContactType(String contactType) {
          this.contactType = contactType;
    }

  • How can i increase performance JSP with database?

    Hi,
    I am working a forum.
    I have been facing a problem.
    i am getting collection of records from sql server database to jsp page. here all the records to take long time (*delayness jsp with database*).
    plz any bodies know that increase the permance, tell me.
    thanks & regards,
    k.s.kumar

    again very bad idea never use Put DB Code or Business Logic or Special Service requests inside the servlets/backing beans.
    Ideally the below is the method which is recommended for a Peformant J2EE application which focuses at modulality,configurablity,scalablity & performance.
    http://java.sun.com/blueprints/corej2eepatterns/Patterns/index.html
    Anyways,it might be a costly in terms of investment.Ideally i personally fell the below way/patterm could be comparable.
    <!-- View / Presentation Layer -->
    STEP 1 --> VIEW RENDERED(JSP renders view using a View Object/Objects)
    STEP 2 --> USER (Fills Forms accordingly and request for an action)
    <!-- Controller part -->
    STEP 3 --> Controller(Servlet+Backing Bean)
    STEP 3.1 ---> Mapps the request made into a View Object & Scopes it (Done by servlet )
    STEP 3.2 ---> validation of the data in the VO (and servlet is responsible to find appropriate Backing Bean to pass on the respective View Object)
    STEP 3.3 ----> Backing Bean takes help of a ServiceLocator Object(Singleton Object) and gets appropriate Business Object which takes care of all the appropriate business rule(Managed by Specific Containers)
    <!-- Service Locator takes help of specific Stubs to provide access to specific business Object -->
    <!-- MODEL PART -->
    STEP 3.4 ---->Backing bean passes on respective View Object to the Business Object and Business Object apply business rule on the data recievd from the Backing bean and sends appropriate DTO to DAO Object(Singleton Object)
    STEP 3.5 ----> DAO executes responsible DB query and returns a DTO/Collection of DTO to Business Object.
    STEP 3.6 ----> Business Object apply business rules on the data and then passes it back to backing bean.
    STEP 3.7 -----> Backing Bean receievs appropriate DTO/Collection of DTO sent by Business Object Update the View Object Accordingly.
    STEP 3.8 -----> Depending on the results return by Business Object the backing bean returns to reference appropriate JSP to forward/redirect.
    STEP 3.9 -----> Servlet identifies the reference returned and forward/redirects accordingly.
    STEP 4 ---> Repeat STEP 1
    NOTE: One can make use of any builtin frameworks(like struts,JSF,tapestry,Spring MVC,etc or your custom built framework in VC layers, EJB or Spring IoC or Custom Built Component Layer handling business objects and any ORM like hibernate,Oracle Toplink,Ibatis,JDO,JPA or specific custom devoloped DAO layer) to do this job.
    Might Sound bit complicated but is a better way to plug & play with each layer and can enusure other layer is not distrubed because of change in one layer,distributes the load on respective layer & so on.
    Hope that sounds logical
    REGARDS,
    RaHuL

  • Could not initialize the Password Store Database Link value in Preference Store

    I have 9iAS release 2, insfrastructure and midtier installed on the same Windows 2000 box...
    I am trying to install and configure portal on remote machine (solaris) on RDBMS 9.0.1.4...
    - Portal installation was no problem
    - creating a new DAD was no problem
    Now, I am trying to configure portal with MIDTIER mode...It falls over on STEP 1 for INSTALL_ACTION:assocPortalToExistingSSO() module with following error message:
    "SQL> Could not initialize the Password Store Database Link value in Preference Store
    ERROR: User-Defined Exception"
    Database link is been created on my remote database by ptlasst.bat command...
    How do I see whether that DB LINK is working properly ?
    Any comment would be helpful...
    Jagdish

    I found the problem to the iTunes Music Store connectivity. When iTunes version 6 is installed, it places a configuration / preferences file in the following location:
    "C:\Documents and Settings\<user>\Application Data\Apple Computer\iTunes\iTunes.pref"
    This file contains several very large keys:
    Preferences:129= (41,826 characters in length)
    Music Store= (1,722 Characters in length)
    Somewhere in these keys is stored are references to userid's, connections or other TCP/IP / internet connectivity objects that are being used when iTunes is installed. By deleting this file, these old setting appear to be cleared out.
    In my case, one or more of the keys in this file appear to have been storing a property from my old dial-up ISP connection that was no longer valid for my new, Comcast cable modem connection.
    Once I deleted this file, and re-started iTunes, it was as if I had never run the software before. I bypassed the option for searching for and importing .mp4's from My Music, and Itunes opened correctly, with full access to the music store. My library and playlists were intact and all is well.
    Apple should re-write the protion of iTunes codes that stores anything pertaning to an internet connection that may change over time. Alternatively, iTunes should either A) Prompt for this information B) Enable user access to this parameter in a settings dialog C) Access this information dynamically at runtime.
    Paul

  • Failed to communicate with database.

    Hello,
    I have a problem with MYSQL data base. when i start vda service i look at the log file */var/cacao/instances/default/logs/cacao.0* and see:
    Sep 1, 2009 11:33:45 AM com.sun.vda.service.core.ServiceModule waitForDatabase
    WARNING: Could not connect to database. Trying since 555 seconds.
    Sep 1, 2009 11:34:32 AM com.sun.vda.service.core.ServiceModule$Initializer run
    SEVERE: Caught exception: Startup of com.sun.vda.service module failed: Timeout - Failed to communicate with database.
    what could cause this?
    thanks in advance.

    Hi Michael,
    I only think ind doing the same but more... slowly...
    Stop cacao:
    cacaoadm stop -fStop the database (note the '-s')
    svcadm disable -s svc:/application/database/vdadb:sqlStart the database:
    svcadm enable -s svc:/application/database/vdadb:sqlStart cacao:
    cacaoadm startAt the same time you can tail the logs of both:
    /var/cacao/instances/default/logs/cacao.0
    /var/svc/logs/application-database-vdadb:sql.log(I'm not quite of the last log file location)
    Both logs may give perhaps some information.
    Can you post here the complete output from '/opt/SUNWvda/sbin/vda-db-status'? "localhost up" actually can mean three different things.
    It just seems that the database is fine and cacao cannot reach it.
    Jorge

  • Cfgrid with database paging

    Hello, I'm having some trouble with the cfgrid tag and I hope
    that you can help me, since I've been googling for hours looking
    for that and didn't find anything. Here's my problem:
    I'm shoing some data in a cfgrid, and everything's working
    perfectly, but I have a big table in my database and the page takes
    too long to load. I thought of the idea of paging my database
    queries, but now I must make the cfgrid show the total number of
    pages, instead of the number of pages based on the selected
    records, so I can switch pages executing other selects. Is this
    possible? If not, what else can I do to make my query
    faster?

    Look into using the bind attribute with a cfc.
    Ken

  • Object would have more then one attribute with the tag :VALUE

    I'm creating a new component in Ultiboard - a 100 pin connector.  This connector (Hirose) has 4 rows of 25 pins. Alternate rows are staggered. I'm trying to name each pin with it's appropiate name: A1, A2, A3 ....A50. Then B1, B2, B3 .....B50.
    When I change the VALUE or NUMBER attribute, I get the DRC error  message:
    This action cannot be completed because the resulting Object would have more then one attribute with the tag :VALUE
    Please remove one of the attributes and try again.
    Okay, so I've tried deleting the tag and now I can't name the pin at all. 
    What am I missing?

    You should be in the footprint editor to edit the pin name.  Select tools>>Database>>Database Manager, highlight the component in your database and click on the Edit icon.  In the footprint editor, double click on the pad and a SMT or THT pin Properties dialog appears, select the Attributes tab and highlight the Number row, press the change button and you should be able to change the pin name.   
    Tien P.
    National Instruments

  • Populating mx:ComboBox with database info

    Ok, so I set out on a quest to populate <mx:ComboBox with
    info from a database using Flex and Ruby on Rails. I had a really
    hard time finding tutorials about this subject, but using
    information from a large set of tutorials and tweaking the code
    over and over, I finally figured out something that works.
    My model is sourcer
    My controller is sourcers and contains the followign code:
    class SourcersController < ApplicationController
    def create
    @sourcer = Sourcer.new(params[:sourcer])
    @sourcer.save
    render :xml => @sourcer.to_xml
    end
    def list
    @sourcer = Sourcer.find :all
    render :xml => @sourcer.to_xml
    end
    def update
    @sourcer = Sourcer.find(params[:id])
    @sourcer.update_attributes(params[:sourcer])
    render :xml => @sourcer.to_xml
    end
    def delete
    @sourcer = Sourcer.find(params[:id])
    @sourcer.destroy
    render :xml => @sourcer.to_xml
    end
    end
    My migration file had this code:
    class CreateSourcers < ActiveRecord::Migration
    def self.up
    create_table :sourcers do |t|
    t.column :sourcername, :string
    t.timestamps
    end
    end
    def self.down
    drop_table :sourcers
    end
    end
    and finally the application code contained:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" >
    <mx:HTTPService id="listSourcers" url="
    http://localhost/sourcers/list"
    useProxy="false" method="GET"/>
    <mx:VDividedBox x="0" y="0" height="100%"
    width="100%">
    <mx:Panel width="100%" height="300" layout="vertical"
    title="Create/Update Denial Reasons">
    <mx:Form>
    <mx:FormItem>
    <mx:ComboBox
    dataProvider="{listSourcers.lastResult.sourcers.sourcer}"
    labelField="sourcername"
    creationComplete="listSourcers.send()"/>
    </mx:FormItem>
    </mx:Form>
    </mx:Panel>
    </mx:VDividedBox>
    Now this can be condensed to the following important items:
    <mx:HTTPService id="listSourcers" url="
    http://localhost/sourcers/list"
    useProxy="false" method="GET"/>
    <mx:ComboBox
    dataProvider="{listSourcers.lastResult.sourcers.sourcer}"
    labelField="sourcername"
    creationComplete="listSourcers.send()"/>
    Things to note -
    - if you leave out the labelField="sourcername" in the
    <mx:ComboBox> tag you will "object: Object" in the dropdown
    after compile.
    - if you leave out the
    creationComplete="listSourcers.send()" in the <mx:ComboBox>
    you will get a dropdown that is blank, but is sized correctly. Also
    something to note on this line is it can be included in the
    <mx:Application> tag but then if you have multiple ComboBoxes
    you're going to need it in each of the <mx:ComboBox> tags.
    Anyway, I hope this helps someone.

    Hi,
    Try logic similar to this instead:
    listOfIds as String[]
    for each element in
        SELECT prsnombre
        FROM nameOfYourTable
        WHERE prsrut = 12486023
    do
        listOfIds[] = element.prsnombre
    end
    return listOfIdsThis logic assumes that "prsnombre" is the name of the attribute you want returned, "nameOfYourTable" is the table's name and "prsrut" is the attribute with one or more rows in the table that has the value 12486023.
    The underscore characters in tables and columns are a bit wacky unless you are using something called Dynamic SQL. The above statement does not use Dynamic SQL and note that I did not include them in the logic. Not sure if this is your problem, but try it without the underscore characters if your logic uses the JDBC SQL syntax shown above.
    Hope this helps,
    Dan

  • Add management server: Setup version: 7.0.9538.0 is not compatible with database version: 7.1.10226.0

    I want to add another management server to our existing SCOM environment. But whenever I run this setup on a new server I get stuck in the window for selecting the OperationsManager database. The database field stays blank and in the OpsMgrSetupWizard log
    there are lines that the setup version is not compatible with the database version. But I use the same installer as when I installed the other management servers a year ago.
    Maybe there is a newer setup installer? But I can't find it.
    [10:42:54]: Error:
    :Error:setup version: 7.0.9538.0 is not compatible with database version: 7.1.10226.0
    [10:42:54]: Info:
    :Info:Using DB command timeout = 1800 seconds.
    [10:42:54]: Info:
    :Info:isOMDatabase:  Read returned true.  so far, this is OM DB, not an empty DB
    [10:42:54]: Debug:
    :Connection was not open.  We will try to open it.
    [10:42:54]: Debug:
    :SqlConnectionReady returned True.
    [10:42:54]: Info:
    :Info:Using DB command timeout = 1800 seconds.
    [10:42:54]: Info:
    :Info:isOMDatabase:  Read did not return true.  The MG is missing. This is not OM DB
    [10:42:54]: Info:
    :Info:Using DB command timeout = 1800 seconds.
    [10:42:54]: Always:
    :Azman store table not found in OperationsManagerDW table, assuming this is an not a valid OMDB for empty DB scenario.
    [10:42:54]: Info:
    :Info:DatabaseConfigurationPage: DB connection attempt completed.
    [10:42:54]: Info:
    :Info:DatabaseConfigurationPage: DB connection attempt completed.

    Never mind, found it!
    Apparently there was a newer version of SCOM setup in msdn and someone upgraded our existing SCOM environment. Downloaded the new setup, new report viewer controls and a System
    CLR Types for Microsoft® SQL Server® 2012 and now it works!! 

Maybe you are looking for