Problem with Null

Hi gurus,
I have a requirement like this, whenever there is a null value in the table, it will be replaced by a zero. Is there a possible way to accomplish this task.
Thank you

Hi user13519477,

You can try this link.
http://total-bi.com/2010/10/replace-nulls-in-OBIEE-pivot-table/

Thank you
Don

Tags: Business Intelligence

Similar Questions

  • Script to generate XML files... problem with null values

    Hello everyone,

    I come here with a question that troubled me for some time. I have a script which I run in SQLPLUS every now and then to generate an XML file.

    Problem is that the data that must be in XML format are not allways <>NULL and I need to hide empty tags < / tag >.

    I'll post my script below and if you could help me with it, it would be really great!

    Thanks for reading!
    set long 20000000
    set long 20000000
    set linesize 32000
    SET ECHO OFF
    SET TRIMSPOOL on
    SET HEADING OFF
    SET PAGESIZE 50000
    SET VERIFY OFF
    SET FEEDBACK OFF
    SET TERMOUT OFF
    spool C:\test.xml
    set serveroutput on
    begin
      dbms_output.put_line('<?xml version="1.0" encoding="utf-8" ?>');
    end;
    /
    SELECT
    XMLELEMENT("ReportRoot",XMLATTRIBUTES('http://www.w3.org/2001/XMLSchema-instance' as "xmlns:xsi", 'http://www.w3.org/2001/XMLSchema' as "xmlns:xsd" , '1.0' as "Version",sysdate as "CreationDate",to_char(sysdate,'hh:mm:ss') as "CreationTime",'1524544845' as "id"),
    XMLELEMENT("Porocila",XMLELEMENT("JOLY",(SELECT XMLAGG (XMLELEMENT("RefNrReport",replace('SON'||to_char(ref_ST,'00000'),' ',''))) from access_table_2 where ref_ST = &1),
    XMLELEMENT("ReportDate",sysdate),XMLELEMENT("Labeling",'545254450'),
     (SELECT XMLAGG     (XMLELEMENT("Reportf",
                                                                     XMLELEMENT("access",access),
                                                                     XMLELEMENT("date",date),
                                                                     XMLELEMENT("datep",datep),
                                                                     XMLELEMENT("ModificationInfo",'M'),XMLELEMENT("ModificationReason",modireason)))
                                                 from v_xml_test where id_dok = &1 and ind_print = '1'))))
      .extract('/*')
      from dual
         /     
         spool off
    /
    exit
    Now lets pretend that
    XMLELEMENT("datep",datep),
    sometimes is NULL and I don't want to see it.

    Now lets pretend that

    XMLELEMENT("datep",datep),
    

    sometimes is NULL and I don't want to see it.

    XMLForest that does exactly:

    XMLForest(datep as "datep")
    

    (internally, it is equivalent to what Alex has suggested)

  • Problems with null dropTarget

    Hey guys.  I'm testing now on different things and I'm doing a box that, when one of the two bullets fell inside and causes the text of the appropriate color display (i.e. redBall appear 'RED', 'BLUE' poster blueBall when left in the box).  I went through a few different ways to do it, but now I am using dropTarget.  I find that when I put in the box using the code below, everything works fine, but if I drop anywhere off the beaten path, I get an error message «cannot access a property or a method of a reference object null.»  I'm assuming that I'm just formulating this second statement conditional dropTarget (if (e.currentTarget.dropTarget == null)) wrong, but I don't know how to fix it.  Here's the code for cancelling feature that I use:

    function drop(e:MouseEvent):void
    {    
        e.currentTarget.stopDrag();
                
        if (e.currentTarget.dropTarget.parent == box)
        {
            if (e.currentTarget == redBall)
            {
                wordBox.addChild(redText);
            }
            if (e.currentTarget == blueBall)
            {
                wordBox.addChild(blueText);
            }
        }
        if (e.currentTarget.dropTarget == null)
        {
            if (redText.stage != null)
            {
                wordBox.removeChild(redText);
            }
            if (blueText.stage != null)
            {
                wordBox.removeChild(blueText);
            }
        }
    }
    function drop(e:MouseEvent):void{        e.currentTarget.stopDrag();
    
    if(e.currentTarget.dropTarget!=null){    if (e.currentTarget.dropTarget.parent == box)
        {
            if (e.currentTarget == redBall)
            {
                wordBox.addChild(redText);
            }
            if (e.currentTarget == blueBall)
            {
                wordBox.addChild(blueText);
            }
        }
        if (e.currentTarget.dropTarget == null)
        {
            if (redText.stage != null)
            {
                wordBox.removeChild(redText);
            }
            if (blueText.stage != null)
            {
                wordBox.removeChild(blueText);
            }
        }
    }}
    
  • Just recently, I receive the following error message when you try to access the web sites. I get a pop-up window indicating "Exc in ev handl: TypeError: c.location is null" then I have to click ok. There is a problem with some plugin?

    Just recently, I receive the following error message when you try to access the web sites. I use Firefox browser version 10.0.2. I get a pop-up window indicating "Exc in ev handl: TypeError: c.location is null" as the web site page is displayed in the browser winder. So, I have to click ok. Any link/website I go to what happens. There is a problem with some plugin?

    It is only a problem for the SiteAdvisor users who are still on 3.4. This problem is resolved in the latest version of SiteAdvisor, which is 3.4.1.195. Go to http://siteadvisor.com and click on download. This will fix the problem.

    Meanwhile, SiteAdvisor team will push down a JS update in the coming days 1-2 to automatically resolve this problem in version 3.4.

  • I have problem with value NULL when the use CASE statement please help this question

    I have problem with value NULL when the use CASE statement please help this question


    Table: digital_val

    SNO cl C2

    1 San1 11

    2 22 San2

    Actual result: expected to A         B

    A            B                                                                           11        22

    11 NULL

    22 NULL



    query:

    Select case when c1 = "san1" then c2,.

    case If c1 = "san2" then c2 B

    of digital_val

    I'm more curious why, when you select 2 rows, you expect a result of row?

    WITH digital_val

    AS (SELECT 1 AS 'Sno', 'San1"C1, c2 FROM DUAL 11)

    UNION ALL

    2 SELECT AS 'Sno', 'San2"C1, c2 FROM DUAL 22)

    SELECT CASE WHEN c1 is "San1" THEN END AS A c2.

    CASE WHEN c1 = "San2" THEN END AS B c2

    OF digital_val;

    With no other input, if you select 2 rows, you get 2 rows.  One of the other solutions use a max function, but is this really what you want, does not specify?

  • Satellite U400-PSU44E - problem with XP drivers

    Hello
    I have the Satellite U400-PSU44E. It was the Vista Home Premium pre-installed spirit, but I had to install XP Pro.
    Under XP I have problem with installing the drivers. If I try to install driver sound I get info that the media is not found, even with the modem driver. I tried to install the electricity utility of Eve - in the last step of the installation, I get an error, and this error ia´m getting always ia´m try to uninstall this version adding utility / Removo programs.
    HARD drive protection utility I also install the Cana´t - I Dona´t don't know if this feature is supported in my Toshiba, but if this pilot is being Satellite U400 PSU44E I think it should be.
    ChipSet drivers and BIOS I installed as the first.
    I downloaded only the drivers from the web site of Toshiba (ce.computers.toshiba...) for win XP.

    Any suggestions?
    Please, please, help me!

    PS: is there some suggested order of installing the drivers for this model?

    Post edited by: helpfinder

    null

    Hello

    I n t have U400 cannot say much about it, but if you want to have good facilities order here it is:

    1 Windows XP Service Pack2 (RTM)
    2 Service Pack2 (RTM) VALUEADD folder
    3 SUPPORT Service Pack2 (RTM) folder
    Microsoft Internet Explorer V6.0 (SP2) 4
    DirectX V9.0c 5 (SP2)
    Windows Media Player 10 V10.00.00.4036 6
    7 Windows Movie Maker V2.1.4026.0
    Module 8 SLP OEMSLP2.0 (523759)
    9 Microsoft .NET Framework V1.1.4322 (SR1) V1.1
    10 Microsoft .NET Framework V2.0 V2.0.50727.42
    11 Sun Java 2 Runtime Environment V1.6.0_03
    Module of Chipset Intel (r) 12 V8.3.0.1014
    13 Intel iMSM Driver V7.8.0.1012
    14 Intel Crestline-GM / UMA Driver V6.14.10.4096
    or
    14 AMD M82XT /M86 Driver 8.452.2 - 080130 a-059240C
    15 Conexant CX20561 Audio Driver V3.47.1.0
    16 Marvell 8040/8055 LAN Driver V10.51.3.3
    17 Synaptics Touch Pad Driver V10.1.7.0
    18 Alps Touch Pad Driver V6.0.305.11.1
    19 V7.70.00.00 Conexant Modem driver
    20 modem region Select utility V2.2.3.2 (RST223MAC02)
    21 Golan/Kedron Intel Wireless LAN Driver V11.5.0.32 for XP with cat
    22 Intel Proset utility for XP V11.5.0.0.3
    23 Atheros Wireless LAN Driver V7.4.2.75
    24 Atheros Client Utility V7.0.1.70
    25 Realtek RTL8187B Wireless LAN Driver V5.1116.1226.2007
    Camera Chicony 26 V6.2.238.1217 software
    Bluetooth Stack for Windows by Toshiba V6.10.02T 27
    28 TOSHIBA SD Memory utilities V1.8.1.1
    29 Authentec AES1610 Fingerprint Utility
    Toshiba TrueAcess Manager Suite V7.9.0.4 (20080229)
    V2.00.01.00
    30 TOSHIBA ConfigFree V5.90.08
    31 TOSHIBA help V1.03.00 upd4
    32 TOSHIBA Speech System V1.00.2514
    33 CD/DVD Drive Acoustic Silencer V1.00.008
    34 Toshiba HDD Protection V2.0.2.3
    PC Diagnostic TOSHIBA 35 tool v3.2.6:
    36 TOSHIBA Touch ED V3.0.1.0
    TOSHIBA Hotkey Utility V3.0.1.0 37
    V3.0.1.0 utility TOSHIBA 38
    39 TOSHIBA Control Utility V3.0.1.0
    40 Toshiba Power Saver V7.04.02.Q
    41 Toshiba zooming Utility (smooth view) V2.0.0.24c

    Install all the necessary stuff following this order of installations.

    Please send comments.
    Good luck!

  • Problem with driver with Agilent 6031 A feeding

    Hello and goodmorning,

    I tried to develop my first application of cvi in which I need to use a power supply (model Agilent 6031 A). I first use direct command of GPIB and I managed to make it work, but with some difficulty, due to the fact that sometimes orders are missed.

    So I downloaded the driver from the website of OR, and I tried to implement in my code. I found a problem with the first statement, the init it. Here is my code:

    ViPSession InstrumentH;
    ...
    ...
    ...
    All = hp6xxxa_init ("GPIB0::5:INSTR", VI_ON, VI_ON, 1, & InstrumentH);

    After running the above code, I found in 'All' value '-1073807339 "and InstrumentH is equal to NULL."

    Any idea and advice would be much appreciated.

    P. S.

    There is a way, as in Labview, to find the explanation of the error Code?

    Found the problem. Food must be set of SCPI commands on the old controls ARP using "SYST:LANG".

  • Problem with KB2229593 Continuning

    I hope that this will help make the lighter on the probem I meet andy useful suggestions would be welcome.

    I checked the log file for KB2229593 and for the following:

    2010/07/15 11:31:07.203 (local)
    0,859: C:\WINDOWS\SoftwareDistribution\Download\2c0d861a85182505b6e0107596abb839\update\update.exe (version 6.3.13.0)
    0,859: impossible to activate SE_SHUTDOWN_PRIVILEGE
    0,859: hotfix started with following command line: - q - z - er /ParentInfo:383046e34048b74e8718fd99233399bd
    0,859: in function GetReleaseSet, line 1211, RegOpenKeyEx failed with error 0x2
    0,859: in function GetReleaseSet, line 1240, RegOpenKeyEx failed with error 0x2
    2,062: in function TestVolatileFlag, line 11825, RegOpenKeyEx failed with error 0x2
    2,062: in function TestVolatileFlag, line 11857, RegOpenKeyEx failed with error 0x2
    2,062: DoInstallation: CleanPFR failed: 0x2
    2,062: in function GetReleaseSet, line 1211, RegOpenKeyEx failed with error 0x2
    2,062: in function GetReleaseSet, line 1240, RegOpenKeyEx failed with error 0x2
    2,062: SetProductTypes: InfProductBuildType = BuildType.IP
    2,062: SetAltOsLoaderPath: no section uses DirId 65701; fact.
    2.078: DoInstallation: FetchSourceURL for c:\windows\softwaredistribution\download\2c0d861a85182505b6e0107596abb839\update\update_SP3GDR.inf failed
    2.078: CreateUninstall = 1, C:\WINDOWS\$NtUninstallKB2229593$ = directory
    2.078: LoadFileQueues: UpdSpGetSourceFileLocation for halaacpi.dll failed: 0xe0000102
    2.094: BuildCabinetManifest: missing update.url
    2.094: from AnalyzeComponents
    2.094: AnalyzePhaseZero used 0 graduation
    2.094: no c:\windows\INF\updtblk.inf file.
    2.094: analysis of file used OEM 0 graduation
    2.094: AnalyzePhaseOne: used 0 graduation
    2.094: AnalyzeComponents: analysis /hotpatch disabled; jump.
    2.094: AnalyzeComponents: this feature is disabled.
    2.094: FindFirstFile c:\windows\$hf_mig$\*.*
    2.109: KB2229593 Setup has encountered an error: the update.ver file is not correct.
    2.125: KB2229593 Setup has encountered an error: the update.ver file is not correct.
    2.250: AnalyzeForBranching used 16 ticks.
    2.250: AnalyzePhaseTwo used 0 graduation
    2.250: AnalyzePhaseThree used 0 graduation
    2.250: AnalyzePhaseFive used 0 graduation
    2.250: AnalyzePhaseSix used 0 graduation
    2.250: AnalyzeComponents used 156 ticks
    2.250: downloading 0 files
    2.250: bPatchMode = FALSE
    2.250: inventory complete: ReturnStatus = 0, 172 ticks
    2.250: Num ticks for invent: 172
    2.265: VerifyTargetFileSize: impossible to verify size as Source = NULL for file c:\windows\inf\HFX2E6.tmp
    2.281: copied file: c:\windows\inf\branches.inf
    8,297: allocation of the C: disk size is 4096 bytes, space free = 33748414464 bytes
    8.328: AnalyzeDiskUsage: EstimateDiskUsageForUninstall to jump.
    8.328: drive C: free 32184MB req: 14Mo w/uninstall: DO NOT CALCULATED.
    8.328: all CabinetBuild
    8.328: Num ticks for Cabinet build: 6078
    8.328: DynamicStrings section not defined or empty.
    8.344: FileInUse: disabled detection.
    9.390: LoadFileQueues: UpdSpGetSourceFileLocation for halaacpi.dll failed: 0xe0000102
    9.406: ArchiveFileForUninstall: ArchiveSingleFile cancelled
    9.422: DoInstallation:UpdSpCommitFileQueue for FileQueue failed: 0x4c7
    9.453: unregister the uninstaller--> KB2229593, 2
    9.453: KB2229593 cancelled installation.
    9.453: Update.exe extended error code = 0xf00d

    Visit the Microsoft Solution Center and antivirus security for resources and tools to keep your PC safe and healthy. If you have problems with the installation of the update itself, visit the Microsoft Update Support for resources and tools to keep your PC updated with the latest updates.

    ~ 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

  • Callback thread will not end, problem with CNVDisposeData?

    I have a problem with a thread of reminder on a RT system. I work with CVI 8.5 on the pc and the engine Runtime 9.0 on the RT system.

    I use a client-server architecture, the client writes data to a network 1 d variable, the server is informed via a connection to the Subscriber and frees a callback function. My problem is, this callback function is launched in another thread (not the main thread) and is not over. I reduced the problem as much as I could, right now the only thing I do in my callback is to have the CNVdata. The problem occurs when the callback is released, create and destroy the connection to the Subscriber without calling the callback does not lead to any problems.

    The real problem with this, is that when my program ends, there are still threads running on the RT system, which can lead to problems later (I have a multi-day-measure application that crashes always at the same time, so I must really have it clean) to the left.

    I'll try to post a snippet of code to make sure you get what I'm doing (all in the main RT, for simplicity):

    CNVCreateSubscriber (serveurnom, dataCallback, NULL, NULL, 3000, 0, & dataSubscriber);

    While (!.) () RTIsShuttingDown &! error)
    {
    ProcessSystemEvents();
    Sleep (100);
    }

    CNVDispose (dataSubscriber);

    ProcessSystemEvents();

    CloseCVIRTE();

    My point basically looks like this:

    Sub CVICALLBACK dataCallback (void * handle, CNVData data, void * callbackData)
    {
    CNVDisposeData (data);
    }

    When I look at my son when running, I see from the callback thread, when I'm inside, but it's still there afterwards. In addition, what is CNVDisposeData supposed to do? The variable 'data' retains its value even after disposing. I don't see any change at all.

    I would appreciate any comments or ideas, I have tried to solve this problem for a few days and really don't know what else I could try!

    Yes, for the network variables, callbacks are called on a dedicated worker thread. Do not calls to ProcessSystemEvents - network variable reminders will be always called. You must call CNVFinish at the end of RTmain to ensure that the worker thread comes out cleanly. If your variable is hosted (configured) on RT target, then the worker thread can continue to operate even after the call to CNVFinish - I recommend that you host the variable on another machine, said the Windows host.

  • Problems with timing of analog input PCI-6111

    I'm reading the analog input of a PCI-6111, who receives a square signal of 1 KHz with a cycle of 50%.  I put the sampling frequency to 1 MHz and wait until the data points are 1 usec outside.  When I check the signals received, it appears that the duration of each period of the square wave is 1.22ms instead of the expected 1.0 ms.

    The following is a snippet of what I tried:

    int NUM_SAMP = 10000;
    DAQmxCreateTask("",&mTaskHandle);

    DAQmxCreateAIVoltageChan (mTaskHandle,

    "(/Dev1/AI0","",DAQmx_Val_Cfg_Default,-10.,10.,DAQmx_Val_Volts,null); "

    DAQmxCfgSampClkTiming(mTaskHandle,"",1000000,DAQmx_Val_Rising,DAQmx_Val_ContSamps,NUM_SAMP);

    DAQmxReadAnalogF64(mTaskHandle,NUM_SAMP,10.0,DAQmx_Val_GroupByScanNumber,mDataBuf,NUM_SAMP,&numRead,);

    Can you tell me what I am doing wrong?

    Hello SNL_NB_1167,

    A good place to watch code you know works would be the finder of the example.  "" "" Open the finder example and navigate to hardware input & output "DAQmx" analog measures ' tension ' ContAcq - IntClk.prj

    Run this code and see if you get the same results.  If so, then we would know that it's a hardware problem and not a problem with the programming.  If you see the correct behavior, then you have code that you can shape your out of.  I hope this helps.

  • Problems with video recording

    Hello

    I have some problems with the video recording on the BlackBerry.

    On the BB 9700 my application crashes when I try to stop recording. The file produced
    the app is empty.
    On BB 9800 I have the same problem unless I have explicitly defined the video resolution, but
    in this case, the resolution of the resulting video is different from what I
    specify (640 x 480 instead of 320 x 240).
    On BB 9300 an application works without problem.

    Here's the example I use:

    //////////////////////////////////////// App.java
    VCR package;

    Import net.rim.device.api.ui.UiApplication;

    public class App extends UiApplication
    {

    Public Shared Sub main (String [] args)
    {
    final App app = new App();
    app.enterEventDispatcher ();
    }

    public App()
    {
    last screen VideoRecorderScreen = new VideoRecorderScreen();
    pushScreen (screen);
    }

    }

    VideoRecorderScreen.java
    VCR package;

    import java.io.IOException;
    import java.util.Timer.
    java.util.TimerTask to import;

    Import javax.microedition.media.MediaException;

    Import net.rim.device.api.ui.UiApplication;
    Import net.rim.device.api.ui.component.Dialog;
    Import net.rim.device.api.ui.container.MainScreen;

    / public final class VideoRecorderScreen extends screen
    {

    Private final int DELAY = 1000;

    Private final String VIDEO_PATH = "file:///SDCard/BlackBerry/videos/video.3gp";
    Private final String VIDEO_ENCODING = "video/3gpp";
    Private final int VIDEO_DURATION = 5000;
    Private final int VIDEO_WIDTH = 320;
    Private final int VIDEO_HEIGHT = 240;

    recorder recorder private;

    Public Sub onDisplay()
    {
    new timer() .schedule (new TimerTask() {}
    public void run() {}
    Start();
    }
    (}, DELAY);
    }

    private void start()
    {
    Exception Exception = null;
    try {}
    This.Recorder = new recorder (this. VIDEO_ENCODING, this. VIDEO_WIDTH, this. VIDEO_HEIGHT);
    This.Recorder.record (this.) VIDEO_PATH);
    } catch (MediaException ex) {}
    Exception = ex;
    } catch (IOException ex) {}
    Exception = ex;
    }

    If (exception! = null) {}
    Warn (exception);
    return;
    }

    new timer() .schedule (new TimerTask() {}
    public void run() {}
    try {}
    VideoRecorderScreen.this.recorder.end ();
    warn ("check");
    } catch (IOException ex) {}
    Warn (ex);
    }
    }
    }, this. VIDEO_DURATION);
    }

    private void warn (Object, object)
    {
    the final String message = String.valueOf (object);
    UiApplication.getApplication () .invokeLater (new Runnable() {}
    public void run() {}
    Dialog.Alert (message);
    }
    });
    }

    }

    Recorder.Java
    VCR package;

    import java.io.IOException;

    Import javax.microedition.media.Manager;
    Import javax.microedition.media.MediaException;
    Import javax.microedition.media.Player;
    Import javax.microedition.media.control.RecordControl;

    public class logger
    {

    Final private player vp;

    private RecordControl rc;

    Recorder of public (encoding String, int w, int h)
    throws MediaException, IOException
    {
    This.VP = Manager.createPlayer ("capture://video?encoding=" + coding
    + '&' + 'Width' + '=' + w
    + '&' + 'height' + '=' + h);
    }

    public void save (String path)
    throws MediaException, IOException
    {
    This.VP.Start ();

    This.RC = this.vp.getControl ("RecordControl") (RecordControl);
    If (this.rc == null) {}
    throw new MediaException ("RecordControl could not be obtained");
    }

    this.rc.setRecordLocation (path);
    this.rc.startRecord ();
    }

    public void end()
    throws IOException
    {
    If (this.rc == null) {}
    throw new IllegalStateException ("RecordControl not initialized");
    }

    this.rc.stopRecord ();
    This.rc.Commit ();

    //
    This.VP.Close ();
    }

    }

    Upgrade to an operating system that has the fix is the only solution I'm aware of, but depending on who may or may not be an option.

  • Problem with the ObjectListField

    Hello

    I have problems with the method getSelectedIndex() ObjectListField.
    Supposedly, when there is no index selected, it returns-1. But how come it always returns the index of the last element?

    To illustrate, I created my own dialog that has similar functionality to the "device window select" Bluetooth BB application. I have an ObjectListField and a Cancel button. What I did simply, is to change the label of the button to show the selected index. I have attached my sample code below.

    public class MyDialog extends dialog
    {
    private ObjectListField m_list;
    private ButtonField m_btn;

    public MyDialog)
    {
    Super ("Select Device:", null, null, 0, Bitmap.getBitmapResource ("bluetoothIcon.PNG"), Manager.FOCUSABLE);

    m_List = new ObjectListField();
    m_btn = new ButtonField ("Cancel", Field.FIELD_HCENTER);
    m_List.set (new String [] {"first", "second"});

    Add (m_List);
    Add (m_btn);
    }

    protected boolean navigationClick (int status, int time)
    {
    m_btn.setLabel (Integer.ToString (m_List.getSelectedIndex ()));

    Returns true;
    }
    }

    Can someone help me on this problem? Is there something wrong with my code, or is the buggy API? All I want to do is to return an index of-1 if there is no selected item in the list.

    Also, I tried the isFocus() method to check if the list is being concentrated, it always returns false even if the list is OBVIOUSLY being focused. I'm running out of options on how to determine the solution to this problem. Help, please!

    Thank you very much.

    @jacylan - I do not use isFocus() to determine if the ListField is net.  Take a look at the following code, I think that with this, you can force-1 when the ListField is not the point.

        protected boolean navigationClick(int status, int time)
        {
            int selectedIndex = m_list.getSelectedIndex();
            boolean listInFocusOption1 = false;
            if ( this.getLeafFieldWithFocus() == m_list ) {
                listInFocusOption1 = true;
            }
            boolean listInFocusOption2 = false;
            if ( m_list.isFocus() ) {
                listInFocusOption2 = true;
            }
            m_btn.setLabel(Integer.toString(selectedIndex) + ":" + listInFocusOption1 + ":" +listInFocusOption2);
    
            return true;
        }
    
  • Problems with Connector.open

    I'm having a problem with the re-login to a HttpsConnection once a failure has occurred. I send a message to a php site that works 100% OK. However, if I drop the receipt when sending at the reception is retrieved Connector.open no reconnect not (even after a long wait). and gives a "java.io.InterruptedIOException: connection Local has expired" exception. The issue is not corrected until the phone is rebooted.

    I use MDS to transport and endpoint certificate has a valid certificate (does not Self-signed). Before I drop the front desk, a message is sent correctly and using the console creates the following log entries:

    [0,0] * start sending:

    [0,0] SSL :-> CH

    [0,0] SSL:<>

    [0,0] SSL:<>

    [0,0] SSL:<>

    [0,0] SSL:<>

    [0,0] SSL :-> CKE

    [0,0] SSL :-> CCS

    [0,0] TLS :-> F

    [0,0] TLS:<>

    [0,0] VMISVt = 0, h = 1a7b, id = d15a33128dfbb5d9

    [0,0] VM:LNTDa = validation, t = 1, p = D8Mobile

    [0,0] * open Stream:

    [0,0] * sending data:

    [0,0] * server response: 200

    [0,0] * Flushing bos

    [0,0] * input stream of Flushing

    [0,0] * Flushing DOUT

    [0,0] * Flushing HC

    [0,0] TLS:<-Alert -="" level="1" description="">

    [0,0] * emptied all

    Once the reception has been abandoned and valued, the connection begins to open the SSL session and shows the following:

    [0,0] * start sending:

    [0,0] SSL :-> CH

    He gets Nevers to: SSL [0,0]:<>

    After the time-out period, it then returns the exception

    IO exception: java.io.InterruptedIOException: Local connection timed out after ~ 15000

    [0,0] * Flushing bos

    [0,0] * emptied all

    Of course the connection is instantiated is no longer so I can't even try his end on the connector at this stage. I also see the following in the MDS newspapers - although I'm not sure its related:

    <2012-01-18 10:42:03.921="" gmt="">:[528]:::

    What follows is a version of my code. All this code runs since a thread to work constantly in the loop.

    HttpsConnection hc =null;

    InputStream is =null;

    Dout OutputStream =null;

    ByteArrayOutputStream Bos =newByteArrayOutputStream();

    byte [] res = null;

    VR;

    {

    System.

    HC = (HttpsConnection) Connector.open (url + ";" ConnectionTimeout = 15000; deviceside = false');

    "Credentials of string = this._username +": "+this._password;"

    byte [] encodedAuthorization = Base64OutputStream.encode (credentials.getBytes (), 0, credentials.length (),false,false);

    () hc.setRequestProperty

    "Authorization", "basic" +newString (encodedAuthorization));

    () hc.setRequestProperty

    'Content-Type', ' multipart/form-data; Boundary = "+ getBoundaryString());

    dout = hc.openOutputStream ();

    dout. Write (postBytes);

    dout. Flush();

    this._responseCode = hc.getResponseCode ();

    dout. Close();

    is = hc.openInputStream ();

    int ch;

    while ((ch = is.read (())! = - 1).

    {

    Bos.Write (ch);

    }

    RES = bos.toByteArray ();

    }

    catch (IOException ioe) {

    System.out.println ("* IO Exception:" + ioe.toString ());

    this._responseCode = 0;

    RES = null;

    }

    catch (Exception e)

    {

    System.out.println ("* send the Message of the Exception:" + try ());

    this._responseCode = 0;

    RES = null;

    }

    Finally

    {

    VR;

    {

    if (bos! = null) {

    Bos.Close ();

    }

    if (is! = null) {

    is. Close();

    }

    if (dout! = null) {

    dout. Close();

    }

    if (hc! = null) {

    HC. Close();

    }

    }

    catch (Exception e2)

    {

    System.out.println ("* Message send Exception 2:" + e2.toString ());

    }

    }

    of return ;

    }

    I tried on 8700,8900 and 9700 device simulators. I am running JRE 5.0.0 and MDS v4.1.4

    Any help or suggestions will be appreciate - I spent nearly a week debugging it and its slowly driving me crazy!

    Thank you

    Andy

    Try to use the factory connections if you are targettin devices in 5.0 or above, it might solve the prob.

  • openDatabase problem with O.S. 6 simulators

    I use the following code

    var Dataset = function() {}
    This.Database = null;
    this.currentData = null;
    this.onTransact = null;
    this.onDataLoaded = null;
    try {}
    Alert ('a')
    If (window.openDatabase! = "undefined") {}
    Alert ('b');
    try {}
    This.Database = window.openDatabase ('trinisceneapp', ' 1.0', 'gallery', 50 * 1024, function () {alert ('ok open') ;}); ")
    Alert ('cc');
    () This.Database.transaction
    function (c) {alert('c');
    c.executeSql ("CREATE TABLE IF NOT EXISTS cache (key unique int, unique uri text, json text)", [], function () {alert ('ok create') ;});})
    }, function() {alert ('ok tx')}; function() {alert ('fail tx') ;})} ;
    Alert ('SD')
    } catch (e) {}
    Alert ('fail');
    }

    } else {alert ('fail b') ;}}
    } catch (e) {}
    Alert ('failed to open the database');
    }
    };

    a simulator of O.S. 6 9780.

    the performance of a var d = new Dataset(); the code does not work after alert ('b');

    IF I run this code on a simulator of O.S. 5 8520 code will run successfully

    What is the problem with 6 O.S. and openDatabase... I thought it was a HTML5 / feature OS 6?

    Car simulator! device = real. It is not specific to the RIM is: no mobile simulators are not enough for the final testing. They are just not quite representative of the actual device. They are narrow, often very close, but I guarantee that you will always find new bugs not known on a simulator, and the Simulator will not always behave as a real device. It's just the nature of the simulation.

    It is easier said than done, but you really need to test on devices real as much as possible before the production.

  • Problem with criteria, GPS, with plugins Eclipse Simulator.

    Hello

    I work with Eclipse and I do an application that I use the GPS API.

    My problem is that always the LocationProvider.getInstance (new Criteria()) return null.

    The Simulator model 8830, GPS location is a location's the JDE 4.5.0

    Do I need any specific configuration?

    Thank you.

    It is a problem with the BlackBerry itself Simulator.  You can test the GPS using another Simulator model BlackBerry (for example BlackBerry 8310).

Maybe you are looking for