How to store/retrieve 'Date' using persistent data?

Hello everyone - this is my first post on the BlackBerry Support Forums. I'm trying to provide a lot of relevant information as possible, but if I miss anytihng or I did not understand by asking what I want, please let me know.

Background:

I use Eclipse IDE ver 3.5.0 and BlackBerry Java plug-in for Eclipse 1.1. I build my application for BlackBerry JRE 5.0.0.

Question:

I want to save a "Date" field for persistent data so that I can recover and display in the format of Date once again (no chain). Here's a more detailed explanation.

My application has three fields on the main screen. They are

'Name' - AutoTextEditField

"Gender" - ObjectChoiceField

"Date of birth" - DateField

Using persistent data to store the data entered into these fields, as described in the BlackBerry tutorials (http://na.blackberry.com/developers/resources/A13_Storing_Persistent_Data_V2.pdf), I am able to save and retrieve all of these areas, but only in 'Chain' format.

Unfortunately, this won't work for me for the following reason.

I create the Date of birth as follows

"dateOfBirthField = new DateField (" BirthDate: ", System.currentTimeMillis (), DateField.DATE" ");"

This creates an interface evolved for Date of birth, where the user can select and edit fields month, Date and year separately. When the user saves the information entered and wants to retirve it again, I want to display the date recorded in the same format so that the user can change again in exactly the same way as described above. But if I save it as a string, I can't fill in the field "Date" with the "chain" recovered. That is, I can't do something like

dateOfBirthField.setDate (info.getElement (StoreInfo.DOB));

Where "info.getElement (StoreInfo.DOB)" is similar to what is described in the tutorial.

I searched the web for a possible solution, but never found any. All I found to date stored as a string and recovered just to see what was saved, but not for the changes resulting.

Someone please let me know if what I am asking is possible. If Yes, can you please suggest a way to do it?

Thanks in advance.

Or it can store any object extra Long, no need to create garbage in chains.

Long I = new Long (1234556);

long x = i.longValue)

Tags: BlackBerry Developers

Similar Questions

  • How to store/Pull date in HFM using rules

    Hi all

    Could you please suggest how to store/pull date into account server using rules HFM? I thought using the VB/excel function now() but not got the correct results.

    It would be really appreciated if you can help me with this.

    Kind regards

    Yes, I was able to get the day of the month using the day and now work (Day (Now ()). Initially I was using only NOW() but day and now all help.

    Thank you

  • How to store field data calculated in a table when a user disconnects?

    Hello

    I have a report with the following SQL statement.
    Past_Due and Task_Count are calculated fields.
    How can I store their data in a table when a user disconnects?

    Select
    p.ID,
    p.Name,
    p.Description,
    p.assigned_to,
    p.start_date,
    p.Finish_Date,
    p.target_date,
    CASE
    WHEN P.target_date < SYSDATE AND P.finish_date IS NULL THEN round (SYSDATE - P.target_date)
    WHEN P.target_date < P.finish_date THEN round (P.finish_date - P.target_date)
    0 OTHERWISE
    END Past_Due,
    p.Status,
    p.updated_by,
    p.updated_on,
    p.Note,
    Count (t.ID) task_count
    pm_project p, pm_task t
    where
    p.ID = t.project_id (+)
    P.id group,
    p.Name,
    p.Description,
    p.assigned_to,
    p.start_date,
    p.Finish_Date,
    p.target_date,
    CASE
    WHEN P.target_date < SYSDATE AND P.finish_date IS NULL THEN round (SYSDATE - P.target_date)
    WHEN P.target_date < P.finish_date THEN round (P.finish_date - P.target_date)
    0 OTHERWISE
    END,
    p.Status,
    p.updated_by,
    p.updated_on,
    p.Note

    -----
    H5. FYI, I am very new to SQL, PL/SQL, and APEX. Would appreciate much more explanation and full path (for example. Shared components > change the security attributes > VPD)

    Hello

    Past_Due and Task_Count are calculated fields and are therefore useless.
    You must not store redundant data (in general).
    Your past_due also uses a reference to sysdate, so the value is today different from tomorrow. You expect the database to change the value from one day to the next?
    So keep the data where it is and display calculated to your users using your query fields (oher options are available, but you already have the request I will not go in the).

    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this response in marking it as useful or Correct ;-)

  • Apex5: How to store field data in the Pagination of the Page

    Hello.

    We have recently started using Apex 5.0.1 on Oracle mod_plsql and 11.2.0.4.

    I have a (non-interactive) report classic, based on a collection of Apex and use g_fxx tables created by the package APEX_ITEM such as TEXT, DISPLAY_AND_SAVE, CHECKBOX2 procedures.  The report contains two checkboxes and editable and display only text fields containing data users have entered or have been extracted from the base.

    I have a button 'Add NEW LINE' that creates automatically a new line 'empty' in the report.  Clicking on it submits the page.  It is during this time submit that a process "After Submit" transfers what is in these paintings g_fxx in my collection of report.  When the number of added lines exceeds the maximum set for this report (30 lines).  The report then pages and the user will see a single line "empty."

    It all works very well.  The problem comes when the user clicks on the "Back" button  All previously entered data has disappeared leaving lines totally "empty".  Not nice.

    Someone knows how to keep the precedent of the fields in the report when content pagination to the 'Previous' or 'Next' in a report page?

    Thank you.

    Elijah

    EEG wrote:

    I'm sorry to be so long to respond.  Were flooded with more work Apex who had to do to meet a deadline.

    Your question...

    I * should * have been clearer.  The user clicks the 'next' or 'previous' links in the report when moving from one page to the next.  And "partial" page refresh is enabled on this report.  By your question, are you making reference to this partial page refresh must not be activated?

    By default, PPR is disabled on tabular forms generated by the wizard. I thought that if the same had been made in this case that Refresh complete which paging can be triggered some process of page which has affected the collection. However in this case we could probably expect No line rather than empty lines...

    I can't reproduce the problem based on the information provided. Suggest you try to demonstrate the problem on apex.oracle.com.

  • How to store historical data?

    HIII,

    I'll be very happy if someone resolve my issue?

    I try to maintain historical data, I created a table using the materialized view, and every time I refreshed the table with new values, the old value should change to the history table and the current table should be updated with new values. I use oracle 10g. can someone tell how to do this.


    Thankz in advance.

    981145 wrote:
    I created a view, materialized with the name test.

    Simply create table history through copy of the table structure:

    create history_table as
    select sysdate as date_backup, a.* from m_view a where 1=2
    

    981145 wrote: I will update this materialized view once a month.

    define a job with DBMS_SCHEDULER

    981145 wrote:
    When I refresh the test table should switch to test_hist and test the old values will be updated with new values.

    If work is started, it must copy all the data of m_view in the history table:

    insert into history_table
    select sysdate, a.* from m_view a
    

    and then call the dbms_mview.refresh:

    DBMS_MVIEW.REFRESH('M_VIEW', 'C'); --completely refresh
    
  • Can someone suggest how to store the date/time format just for restoration

    Hello
    I do the restore process, but this isn't the case because just my date format.
    I'm him giving like this: export NLS_DATE_FORMAT ='YYYY-MM - DD:hh24:mi:ss'
    then I give in RRS file date like this:

    auxiliary connection.
    run
    {
    until time to_date (July 22, 2011 11:20:13 ',' dd-mm-yyyy hh24:mi:ss');

    It gives me the error:

    Single and double quotes (' or "") are accepted for a quoted string.
    Quotes are not required, except if the string contains embedded spaces.
    ======================================
    I tried giving WD in this format:
    The VALUE up to THAT TIME "to_date('2010-12-15:11:21:56','YYYY-MM-DD:hh24:mi:ss')";

    Then
    "to_date (July 22, 2011 11:20:13 ',' dd-mm-yyyy hh24:mi:ss')"; "

    Nothing works
    -------------------
    The one you suggest please?
    RMAN> run {
    2> set until time "to_date('22-07-2011 11:20:13','dd-mm-yyyy hh24:mi:ss')";
    3> }
    
    executing command: SET until clause
    
    RMAN>
    
  • How to store several data providers

    Hi all

    I'm an e-shop programming and for each product, I have a datagrid where the user can specify the sizes, colors and how much he wanted to buy, now I an add to cart and I what I want is, when he is selected to temporary save all dataproviders to analyze later. Use a table or something else?

    Hello

    Try to use the ArrayCollection collection.

    Thank you

    Jean Claude Chari

  • How to store counter data

    Hello

    I arranged the circuit saw attached. For now the meter will change from 0 to 1 when the analog signal of the DAQ aka changes of direction from false to true. However, I want to continue to count, from 0 to 1 to 2, etc.

    What can I do to achieve this?

    Thank you.

    Your code should do what you want.  I have attached a version simulated your code.  It should continue to count.  I have two questions to ask you if.

    1. What is your false case?  It seems that your having the option "use the default if unwired" enabled for the tunnel exit case structure.  If you do not have a wire through on the case of false, you'll ruin your meter.

    2. ensure that the Subvi, which is connected to the structure of business generates correct Boolean event.

    Yik

  • Retrieve data after a certain line

    Hi guys,.

    Any advice or assistance would be appreciated

    Question: How do I retrieve data after a certain line of a string of delimited by commas that are read from a port series?

    More info: to have a map which includes data values and can be read in the computer via a serial port. Example of a string of acquired data as below:

    Data = 1 bit/s = sensor tool
    ; Label, time, voltage, pressure, temperature, current
    A, 01:33, 5.1, 18.1, 31.2, -.
    B, 01:34, 5.5, 19.2, 30.5, -.
    Data = 1 bit/s = sensor tool
    ; Label, time, voltage, pressure, temperature, current
    A, 01:35, 5.3, 18.3, 30.1, -.
    B, 01:36, 5.1, 19.0, 30.5, -.

    Data = 1 bit/s = sensor tool
    ; Label, time, voltage, pressure, temperature, current
    A, 01:37, 5.1, 18.1, 30.8, -.
    B, 01:38, 5.3, 19.2, 30.1, -.

    The value of these data is kept up-to-date line by line. I would like to start to extract data only on the 3rd block of incoming data. I would not that the first 2 blocks incoming data.

    More info: currently, my idea to do this is to analyse the '; '. data"and put it in a counter. If there are 2 '; data' scanner, then woud counter set to True in a case to start structure to extract the output data. Please see my attached picture.

    However, I'm not able to create also a counter using a table that I can't use a while loop and register shift. You have an idea? Thank you very much.

    Hi pokerprof,

    If you plan to get the data individually, have you tried the following:

    Put the output of the select.vi (where it is used as part of the counter) to a comparison so that when we tell: counter-online 3, begin to extract.

    Alternatively, you can use the below:

    The number of iterations that you plan to run? My concern would be the overflow of integer of the meter (http://en.wikipedia.org/wiki/Integer_overflow).

    You can try like vi, illustrated by johnsold (if you get all the data in a single iteration).

    Thank you

    Warm greetings,

    Lennard.C

  • retrieve data from staging account

    Hello

    does anyone know how we can retrieve data from staging of account using 'Segmentation Wizard', "report analysis tool", model of fusion and mailing, etc.?

    Seems that these tools connect only to the production instance...

    Thanks, Sab

    SAB,

    for segmentation Wizard (and perhaps other office files), you will have to go file - properties - Custom and update the values for the name of pod, if you have a job you know what value it is as I am not "have a practice to watch.

    see you soon
    Alex

  • mobile phone - retrieve data

    How can I retrieve data from my DEAD PHONE so that I can install it on my new phone. the old man is NOT a smartphone, but it is currently connected to my computer via USB

    Hello

    I suggest that you contact the Support Section of the manufacturer of the Mobile phone and ask for their help to recover the data from their phone 'dead '.

    See you soon.

  • How to store data instead of memoryengine to the database when using XML file

    Hi Experts,


    I doubt that in XML for transferring data from the database.
    Transfer of data from XML to the database tables will be store in memory for xml files, my goal is instead stored in the memory table engine
    is it possible to store the data in the database itself...
    I guess that when the size of the data increases say for example given huge amount, store as much data is the big issue here on the right, so to avoid this, is it possible to store
    These data directly in the database level.

    Please understand my requirement, either I have the explanation regarding my requirement and please help me how to do this job...


    THX,
    Sara.

    Remove the dp_doc = option Y of your url. It removes the schema whenever a new connection is created.
    If you don't want to truncate the tables, I think you should also add the option dp_tbl = N.

    Kind regards
    JeromeFr

  • Send with blackBerry Smartphones, how to retrieve data from blackberry?

    Hi, I need to send an email to blackberry and on the user's response, I need to store this data in the database. Can u please help me in this regard. How to send email from web browser, and then retrieve the data in a database.

    khushi289 wrote:
    OK ya... We use Tomact 6. How do you after that

    It is a forum oriented BlackBerry technology, you have questions about web development. I think it's best for you is to find some tutorials on the internet on "how to create a web application on tomcat with a database" or try a forum oriented Tomcat directly.

  • How can I register all of the VMX files found in a list of stores of data with new names

    Hello-

    I'm trying to find a way to search through a given list of data and each discover a warehouse. VMX file, add this machine in the inventory I want to prepend the name of the machine as something different. That is to say, instead of "Machine1", I wish it were registetred as "auto-Computer1.  So, imagine I have an empty data center with 4 warehouses of data stored in a table $arrDatastoreToInclude.  I want to loop through each of these data stores and add all the VMX files I found back in the inventory.

    I know that I can use the following to get data warehouses I want:

    $dsindatacenter = get-data center $DataCenterName | Get-Datastore? | {$arrDatastoreToInclude - contains $_.} Name}

    But I have no idea how to analyze these data stores for the VMX files and what command to add them in the inventory.  Can anyone help?

    Try the following, it is based on the script of the position that Robert mentioned.

    You will need to provide a file (in $VMFolder) where unregistered virtual machines will be stored.

    The Set-VM cmdlet will take care of the rename.

    $DatacenterName = "MyDatacenter" $arrDatastoreToInclude = "DS1","DS2","DS3","DS4"
    
    $dc = Get-DataCenter $DataCenterName $dsindatacenter =  Get-Datastore -Datacenter $dc | ?{$arrDatastoreToInclude -contains $_.Name}
    
    $VMFolder = "MyFolder"
    $ESXHost = Get-VMHost -Location $dc | select -First 1
    foreach($Datastore in $dsindatacenter) {
        # Collect .vmx paths of registered VMs on the datastore     $registered = @{}
        Get-VM -Datastore $Datastore | %{$_.Extensiondata.LayoutEx.File | where {$_.Name -like "*.vmx"} | %{$registered.Add($_.Name,$true)}}
    
       # Set up Search for .VMX Files in Datastore    New-PSDrive -Name TgtDS -Location $Datastore -PSProvider VimDatastore -Root '\' | Out-Null    $unregistered = @(Get-ChildItem -Path TgtDS: -Recurse |         where {$_.FolderPath -notmatch ".snapshot" -and $_.Name -like "*.vmx" -and !$registered.ContainsKey($_.Name)})
        Remove-PSDrive -Name TgtDS
       #Register all .vmx Files as VMs on the datastore   foreach($VMXFile in $unregistered) {
            New-VM -VMFilePath $VMXFile.DatastoreFullPath -VMHost $ESXHost -Location $VMFolder |
            Set-VM -Name ("Auto-" + $_.Name)
       }
    }
    

    Unregistered virtual machines will be saved with Displayname that is present in the VMX file.

    If this would cause a conflict with VM already registered, you can use the Name of the cmdlet New-VM parameter

  • Q re warning on a data store: use the store of data on disk

    We noticed a caveat on a data store:

    Warning
    Use of the data on disk store

    the ability for the data store is illustrated in the screenshot below

    We do not know how to solve this alarm.

    1-11-2011 1-50-19 PM.gif

    Thank you.

    ... 'Space put into service' greater than 'ability '.

    This is probably due to the thin provisioning or have pictures on disks.

    André

Maybe you are looking for