Format string when to get database

Hi all

I have problem when the display string that is based on form data.

Here is the sample code for this problem:

var str:String = "this is the first sentence. \n And here's the second sentence.

...

< s:Label text = "{str}" / >

= > put the output:

Here is the first sentence.

And here's the second sentence

but when I get this string of SQL database, put: here is the first sentence. \n And here's the second sentence

There are no spacing see what character '\n '.

I hope someone can help me.

Thank you and sorry for my bad English.

It would be unusual for a two-character string "-" and "n" to represent the new lines when it is kept in databases or files.  The '\n' is usually converted by the compilers or interpreters in the correct characters.  You might want to look at how this is happening and change before it is stored.

But if you can not change it before it is stored, I believe you can use the following to convert

var fixedString:String = string.replace(/\\n/g, "\n");

Tags: Flex

Similar Questions

  • literal does not format string when collecting in bulk.

    Hello
    should work with 10.2 DB.
      1  declare
      2    type vcArray is table of varchar2(10);
      3    type vdateArray is table of date;
      4    l_group#   vcArray;
      5    l_status vcArray;
      6    l_date vdateArray;
      7    cursor c is select to_char(sysdate, 'YYYYMMDD_HH24MISS') data, GROUP# , status from v$log;
      8  begin
      9  open c;
     10  loop
     11     fetch c bulk collect into l_date, l_group# , l_status;
     12     for i in 1..l_date.count
     13     loop
     14      dbms_output.put_line('l_date: ' || l_date(i));
     15     end loop;
     16     exit when c%notfound;
     17  end loop;
     18  close c;
     19* end;
    declare
    *
    ERROR at line 1:
    ORA-01861: literal does not match format string
    ORA-06512: at line 11
    Just try to display loop a few output of v$ log view :).
    Concerning
    GregG

    Hello

    GregG says:
    Hello
    should work with 10.2 DB.

    1  declare
    2    type vcArray is table of varchar2(10);
    3    type vdateArray is table of date;
    4    l_group#   vcArray;
    5    l_status vcArray;
    6    l_date vdateArray;
    7    cursor c is select to_char(sysdate, 'YYYYMMDD_HH24MISS') data, GROUP# , status from v$log;
    8  begin
    9  open c;
    10  loop
    11     fetch c bulk collect into l_date, l_group# , l_status;
    12     for i in 1..l_date.count
    13     loop
    14      dbms_output.put_line('l_date: ' || l_date(i));
    15     end loop;
    16     exit when c%notfound;
    17  end loop;
    18  close c;
    19* end;
    declare
    *
    ERROR at line 1:
    ORA-01861: literal does not match format string
    ORA-06512: at line 11
    

    Just try to display loop a few output of v$ log view :).
    Concerning
    GregG

    To_char, as the name suggests, returns a VARCHAR2, c.data is therefore a VARCHAR2, but you try to store it in an array of DATEs.
    Do not use TO_CHAR. In fact, there is no need to use a column for that at all, because SYSDATE will always be the same.

    Try something like this:

    declare
        type vcArray is table of varchar2(10);
        l_group#   vcArray;
        l_status vcArray;
        cursor c is select GROUP# , status from v$log;
        run_time DATE;
      begin
      open c;
      loop
         run_time := SYSDATE;
         fetch c bulk collect into l_group# , l_status;
         for i in 1..l_group#.count
         loop
          dbms_output.put_line('run_time: ' || run_time);
         end loop;
         exit when c%notfound;
      end loop;
      close c;
    end;
    /
    

    Published by: Frank Kulash on 12 March 2012 10:26
    Added example.

  • Getting ORA-01861: literal does not match format string whith 2 passes DATE

    Not exactly a complete Newbie, but not an expert either but it left me speechless...

    I have two DATE columns in two different tables.
    In a select statement I compare these two in the where clause.

    ... and
    Table1. Column1 = table2.column1

    I then get

    ORA-01861: literal does not match the format string (and toad has highlighted the second column)

    I made a selection on the two tables to have a look at the values and found that, the values in a table (Toad), has this format: YYYYMMDD but in the other select table produces a column of values in the format YYYY-MM-DD

    I've made a desc on the two paintings and confirmed that the two are DATE columns...

    I've never seen different date formats in the same database... Thinking about it now (I'm home and can not verify) the two tables could be in different schemas... Different schemas can display different date formats?

    In any case, I tried to_date ([column] on the two (in the where clause) and got that a nonnumeric value has been found where a numeric value has been planned (this time for the first column).)

    So I guess I ask how come two different date formats and how to find the nonnumeric value in table 1 which contains lines of 5.8 million

    Any tips/ideas/tips?

    Please check back when you get back to work... I can almost guarantee you that one (if there is not both) of these columns is NOT a data type DATE (or timestamp).

    Or if they are, you are actually handled in a view or query to convert to this type of data.

  • When installing the adobe reader software, I get database error: 2003

    When installing the adobe reader software, I get database error: 2003. Wat is to do

    http://helpx.Adobe.com/Acrobat/KB/troubleshoot-reader-installation-Windows.html

  • I just remdered and recorded an intro I would like to use for all my projects, it is saved in a (* perl) file and is the only option to save in this format.  "When I try to open this file and start a new project using tha the intro file, I get an error.

    I just made and recorded an intro I would like to use for all my projects, it is saved in a (* perl) file and is the only option to save in this format.  When I try to open this file and start a new project using tha the intro file, I get an error "the file is not a supported file or codex is not installed.  How can that be, I made the file using this program and he does'nt recognize files it creates?  Please advise... Thanks /.

    grethell

    What version of Premiere Elements you are using and on what computer operating system is running?

    You cannot import a project file (.prel) in another.

    For now, generalize choice

    a. export your Timeline (your intro) content to a file saved on the hard drive of the computer. And then import that

    file in new projects by using the new project add Media/files and folders. See publish + Share/computer/and the other

    choices here to generate this file intro for later use in other projects.

    b. you can set up what is called a dummy projects - this is a project with nothing other than the intro file. And, at all times

    you want to use the intro, you open one of these saved dummy projects and add your media sources.

    A lot of things to discuss. Please fill in some details more and then we can refine the answer for your particular situation.

    Thank you.

    RTA

  • chain number by "scan value" format string "%.3f" doesn'work

    I had a little problem.

    "To convert a string to a number, I use the function"scan value"with '%.3f' for the ' format string"connector. I would get a 3 digit number. But this doesn't work with the parameter "%.3f.

    Thank you.

    Please check the syntax of using LV Format specifier. There is a table that describes the purpose of each specifier. When you read in the description "when you use a function in shape", the specifier is applied to the number-> string, when you read "when you use a sweep feature", the specifier applies to the String-> number. The syntax of width element applies to both situations, the. Element of syntax accuracy does not work.

  • No way to distinguish between failure and normal when to get the document of the UCM?

    Hello

    I use the service GET_FILE below to get the document from the Complutense University of MADRID

    request.putLocal (IdcService.NAME, IdcService.GET_FILE);
    request.putLocal (IdcDocumentAttribute.DOCUMENT_ID, dID);
    request.putLocal (IdcDocumentAttribute.NAME, dDocName);

    and then the output stream:
    ServiceResponse response = client.sendRequest (context, dataBinder);
    InputStream inputStream = response.getResponseStream ();

    they work most of the time very well.
    However, in this case, exception that I can't file, rather than receive exception, I always get a steady stream until I got out of the stream as a string, I realized that this is a format string HDA indicating failure.

    I wonder if there is no way to distinguish between failure and normal exit without open the output string stream?
    Thank you.

    We expect that the user can download the document so successfully in the form of output stream.

    It's probably a bad support, as you have already seen ;-)

    Is the output as string-HDA when the expected of the UCM rather than throwing exception failure?

    It should be pretty easy parse the real answer to retrieve the status code the system riser. You should not need to open the file to find the error.

    Something like

    response.getLocal("StatusCode")
    

    should tell you if the file has been found. A-16 status code means that the file could not be found. In the case of a successful GET_FILE, it does appear that a status code is still present, so test just for the mere presence of a status code should be sufficient.

  • Unit to the Format string

    Hi all

    If a control already has a unit, and move us to a format based on the string, its does not display is not the same exact unit. For example, under control has 'g' unit, while the format string has unit "kg".

    1. Is it possible to do the format to a string take the exact unit specified in the control?
    2. Is there a way to delete unit in the format based on the string, even if the digital order entry has a specified unit?

    Attachment VI to 2010.

    Thank you

    Knockaert

    Not automatically, no. The problem is that the designation of the unit in effects only control how data is displayed in a particular control. When wire you a value with units in a format to the node of the chain, it will express the value of the base unit for the wire.

    Mike.

  • I am trying to install Windows Server 2008. When I get to the part where I should choose where the operating system is to be installed, it is blank.

    I am trying to install Windows Server 2008. When I get to the part where I should choose where the operating system is to be installed, it is blank. He told me 'No device found drivers. We see the SATA HDD in BIOS, and if I browse for the drivers, the driver is displayed. I used the command line packaged with the installer to format the drive, just to be sure. It is formatted in NTFS.

    original title: can not select the HARD drive to install on

    Thank you for visiting the Microsoft Answers site. The question you have posted is related to Windows Server 2008 and would be better suited to the Windows Server TechCenter community. Please visit the link below to find a community that will support what ask you:

    http://social.technet.Microsoft.com/forums/en-us/winservergen/threads

  • Windows xp sp 1, when I get to the step "I agree" after reading the license, nothing haapens aggremnet?

    Windows xp sp 1, when I get to the step "I agree" after reading the license, nothing haapens aggremnet?

    Personal data backup (which none should be considered 100% reliable at this point) then format the HARD disk and do a clean install of Windows.  Please note that give repair install (upgrade AKA on-site) will NOT fix it!

    HOW to do a clean install of Windows XP: see method 1 and http://michaelstevenstech.com/cleanxpinstall.html#steps in http://support.microsoft.com/kb/978307

    Once installed the clean, you will have the equivalent of a "new computer" in order to take care of everything on the next page before connecting the machine to the internet or one local network (i.e. other computers) otherwise and before using a flash drive or the SD card that is not brand new, or has not been freshly formatted:

    4 steps to help protect your new computer before going online
         http://www.Microsoft.com/security/pypc.aspx

    Other useful references include:

    HOW TO get a computer that is running Windows XP Gold (no Service Pack) fully patched after a clean install
    http://groups.Google.com/group/Microsoft.public.windowsupdate/MSG/3f5afa8ed33e121c

    Tip: After getting the computer fully patched, download/install KB971029 manually: http://support.microsoft.com/kb/971029

    NB: No matter what Norton or McAfee free trial which is preinstalled on the computer when you bought will be reinstalled (but invalid) when Windows is reinstalled. You MUST uninstall the trial for free and download/run the removal tool before installing updates, Windows Service Packs, or updates IE and before installing your new anti-virus application (which will require WinXP SP3 must be installed).

    Norton Removal Tool
         FTP://ftp.Symantec.com/public/english_us_canada/removal_tools/Norton_Removal_Tool.exe

    McAfee Consumer product removal tool
         http://download.McAfee.com/Products/Licensed/cust_support_patches/MCPR.exe

    ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • I install windows xp on a sony laptop. I created a new formatted partition but I get a fatal error message: "syntax error:"D:\I386\asms\10\MSFT\WINDOWS\GDIPLUS\GDIPLUS. " MAN. "

    I install windows xp on a sony laptop. I created a new formatted partition but I get a fatal error message.  one of the components that windows needs to continue Setup could not be installed. Manifest Parse Error: an invalid character was found in text content. Connect the system configuration error: SXS. DLL:syntax error in manifest or policy file "D:\I386\asms\10\MSFT\WINDOWS\GDIPLUS\GDIPLUS. MAN 'at line 0. I bought the oem software installation disc. I bought the computer used and did not get any disk with it. Help, please

    1 person got this response
    Shawn thought it was bad media so I'm a new disc and received the same error does anyone have an idea what might cause this error?

    original title: install windows xp

    Hi sptusch,

    Thanks for posting. Is it a burned disc? If this is you please redownload the image. Also, try the following.

    1. place your Windows XP installation CD and start to her...
    2. Press any button to start the Windows installation (don't worry... we do not actually use the installer at this point)
    3. wait a few moments for the installation program starts, when you see repair an installation of Windows XP using the Recovery Console, and then press the R key
    4. wait until you see this screen, enter the number of your master installation. (Typically 1 to C:\Windows)
    5. press ENTER.
    6. If you are prompted to do so, enter your administrator password. If you don't have one, leave the field blank and press to enter.
    7. from the command prompt, type: chkdsk/r (note the space between chkdsk and / r)
    Allow it to complete undisturbed.
    8. remove the disc, then restart.

    I hope this helps!
    Shawn - Support Engineer - MCP, MCDST
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • Hi im doing a fresh install of xp, but when I get to the product id it says invalid

    Hi im doing a fresh install of xp, but when I get to the product id it says invalid... However I followed the steps to find the product key on the disk, I lost the sticker. any reason why this product key is not working? the hard drive is formatted and Ive tried several times now more double and triple check numbers etc, but still without success... dosent make any sence why he does not accept the product key, the computer is not connected to the internet (dose it have to be?) Please help

    Not enough information, Andrew.

    If you used a CD with a retail version of XP Home (you never did say what type of XP you had!) and if you carelessly lost the COA with the product key if you use magic Jellybean Finder or Belarc Advisor and if you faithfully transcribed the key and if you used the correct installation of new and correctly typed in the key CD (be careful not to confuse a) 8 with a B or a S with a 5, etc.), this method will not work.

    But we do not know the brand and model of your PC. We do not know what method the manufacturer provided to return the PC to its original state. We do not know which method you have elected to use to perform the installation of "fresh".

    In addition, it is impossible to find the product key on the disk (unless it's something like an OEM CD mark Dell that contains a golden master key, which of course cannot be used on a Dell PC!).

    As far as we know is you formatted the hard drive. So, even in the cases where you were, at some point, installed a version valid retail XP home and really lost the COA/product key and otherwise might have found the key to product using the SDM or Belarc, erase you the key when you formatted the drive!

    If you have purchased the commercial version and still have the receipt (proof of purchase), read this page:

    http://support.Microsoft.com/kb/326246

  • How to create a ViewObject attribute where value to get database query

    Hi Expert,

    I have a case for the value of database query. How to create the view additional attribute object where the value get database query?

    parameter binding of attributeId object in view I can do this in ADF with JDeveloper 11.1.1.6.

    Thank you

    Kind regards

    Wade W

    My problem is solved, maybe it's a bug in the JDeveloper 11.1.1.6.0

    I've got error (oracle.jbo.expr.JIEvalException) Houston-25077: name amount not found in the given object: oracle.jbo.server.ViewRowSetImpl@8690e3.

    When I develop by tab Overview (presentation of the business components). It is so strange, because I have an another transient viewAttribute that refer to another object in view and not get an error message like this before I create viewAttribute HeaderAmount.

    Maybe its ridiculous appearance, but when I go to View (lineVO.xml) object and tab to the source xml file, I have edited here. like to write

    <>

    Name = "HeaderAmount".

    IsUpdateable = "false".

    IsSelected = "false".

    IsPersistent = "false".

    PrecisionRule = 'true '.

    Type = "Oracle.jbo.domain.Number"

    ColumnType = 'NUMBER '.

    AliasName = 'VIEW_ATTR. '

    SQLType = 'DIGITAL' >

    <>

    Value = "ActivityHeaderId" / >

    and make sure this xml file are:

    <>

    Name = "ActHeaderView1VO".

    ViewLink = 'model. ActHeaderLineLink ".

    Type = "Oracle.jbo.Row"

    Reversed = 'true '.

    IsUpdateable = "false" / >

    When I try to re-run the application model and it's work...

    Thanks for your help. really appreciate

  • problems by analyzing a date format string...

    Hi all, I'm having a hard time to convert a date into a string.

    I was using to_char but after much research, I thought that it would be better to use convert so I do:

    SELECT CONVERT (VARCHAR (8), 'November 19, 2012', 112) twice;

    Where the specifications for 112 is YYYYMMDD but I get the error "ORA-00936: lack of expression ', guess is cause Oracle do not know how to read the string to be converted.

    How can I convert a YYYYMMDD string format string of the form dd mmm yyy (as described above)?

    Thanks in advance,

    It seems that your search will lead you to a SQL Server thread. SQL Server uses arbitrary numbers to represent date formats. Oracle does not - the number 112 is irrelevant for Oracle.

    In Oracle, you convert a date to a string using the function TO_CHAR

    SELECT to_char( date '2012-11-19', 'YYYYMMDD' )
      FROM dual
    

    Of course, this assumes that you start with a date (like I do with my date literal). If you start with a string representing a date and you want to convert it to a string that represents the same date in a different format, you will need to use a TO_DATE and a TO_CHAR to convert the original string to a date and date on another string

    SELECT to_char( to_date( '19 Nov 2012', 'DD Mon YYYY' ), 'YYYYMMDD' )
      FROM dual
    

    Justin

  • Start up problem when having multiple databases on the machine

    Start up problem when having multiple databases on the machine:

    I installed two databases.

    When I stop the database and try to start using

    Startup pfile ='... location... " ;

    I get ora-12514: TNS: listener is not currently know of service rquirest in connect descriptor

    When I try again after 3 seconds, I get a new error, ora-01041: internal error. Hostdef extension doesn't exist

    Stop and start gave no problems when I had a database. Why I get problems when I have two databases?

    I use: show the pfile parameter. SPFile; to make sure that I have the right parameter locations, the error should not be the location.

    I never installed two databases on a single machine, then perhaps that I make mistake of a first - timer.

    Anyone know how to get this working, i.e. start and stop DB without problems?

    The oracle 11 GR 2 on Windows 7 64 bit, everything works normally.

    Thank you
    Ayman

    Published by: aymanzone on June 15, 2011 09:27

    aymanzone wrote:
    My oracle_sid is set to the name of one of my databases

    echo % oracle_sid %

    shows me the name of my first database.

    Still does not.

    When I start the services of two databases by using Services, I can connect and run queries both the database.

    Published by: aymanzone on June 15, 2011 11:47

    First of all... the Oracle Service for the instance must be started for the DB that you try to connect or start.
    Next... from the command prompt:

    Set oracle_sid =

    sqlplus sys as sysdba

    Startup pfile = 'location of the pfile respective db.

    Now, if you want to start or connect to another DB, which is on the same server (again assuming that the Service is STARTED)...
    From the same command prompt or other session...

    Set oracle_sid =

    sqlplus sys as sysdba

    Startup pfile = 'location of the pfile respective db.

    Published by: Srikanth on June 16, 2011 12:27 AM

Maybe you are looking for