JDBC returning default values !! Help Required

There are certain fields in a particular table which are of type integer and these fields in teh database have a value of null ( database null)
Even, When I try to retreive the value of the field using getString method of the ResultSet, the value returned is the default value (0) , is there any way to get the
actual value ( null) ? . Is there any way to avoid getting the default values ?
Regards,
Harsha

You meant getInt(), not getString(), right?
The getInt() method has to return an int, and since that isn't an object, Java doesn't have the concept of "null" for it. So what you do is, after you call getInt() on the ResultSet, you call wasNull() and that returns true if the zero was really a null.

Similar Messages

  • Crystal Reports scheduling disregard the default values and requires prompts to be answered every time.

    Hi guys,
    When scheduling a Crystal report, the page to configure the prompt answers does not have any prompts answered by default - they all appear as "[EMPTY]". This means that any required prompts must be answered during configuration of the alert schedule. Since prompt is required and the default value (which is equivalent to not answering the prompt) is not available in the selection list.
    Is there any way around it?
    Ideally I would like the prompts to keep the default values, so I could schedule the report for all the prompt answers (Whole list of value) instead of having at least one prompt value.
    Is there any configuration in crystal reports or on database side that could help me resolve the issue.

    First off, Thank you for your replies!
    Rabeb SLIMANI, we can't use universes by user requirement. If we could, it would have to be through IDT (Information Design Tool) but, nonetheless, the users want a direct BICS connection between BEx and WebI.
    Victor Gabriel Saiz Castillo, we can't do that because the users want to choose between accessing the published instances or refreshing the reports on demand.
    The way i see it, it would take a second set of BEx query + WebI report to provide both functionalities (one for ready for input, another for not ready for input). Am I correct?
    @Sathish Kumar (sorry, i can't tag you right), i was checking with the BW team and we already have the logic for If left null, populate with Customer Exits.
    But they are currently mandatory, so we will change them to optional and test the behavior.
    If you have any other ideas, they are more than welcome! I will keep you posted on the outcome!
    Best regards,
    Francisco

  • Xcontrol always returns default value

    I have an Xcontrol that holds an enum in the data in shift register. I have a control on the Xcontrol and that should update the value that will be returned whent the control is read, but the control only ever returns the default value of the enum. I have tried updating the value in the data in shift register, and the data in element of the display state in shift register, and neither works.  I can change the Xcontrol using the value propery of a property node. How do I do the same thing with a front panel control of the Xcontrol?

    Post your code so we can see what you're doing.  We might be able to give some advice then.
    Kelly Bersch
    Certified LabVIEW Developer
    Kudos are always welcome

  • OBN call to get value - help required !!!

    Hi Friends,
    The scenario is, upon click on the LinkToAction button, I am able invoke OBN operation service, which gives the list of values using below API function.
    WDPortalNavigation.navigateToObjectWithSpecificOperation
    Prior to thisLink to Action coded to call OBN service, Event created, Event subscribed (at wdInit), Event unsubscribed (wdExit) and Event Action handled.
    Code to call OBN service as below
    String system="XXX_LPT", businessObjType="", objValue="absence", objValueName="absence", operation="show_orgunit_three",
    businessParameters="mode=dialog&location=no&menubar=no&titlebar=no&toolbar=no&ShowHeader=false";
      boolean forwardOBNMetaData=true, resolveForSourceRoleOnly=true;
      WDPortalNavigation.navigateToObjectWithSpecificOperation(system, objValue, objValueName, operation, businessParameters);
    Issue is, the OBN service call happens in separate Tab on the browser and selecting an item just does the refresh on the same window.
    Expected is, upon clicking on the LinkToAction button from the parent window, the OBN service should display in a separate window (not in browser Tab) and after selecting the value, window should close and the value should be available to the parent view to assign to an input box.
    Can anybody help me on this?  I am really struck.
    Thanks in advance,
    Kantha

    Hello Vaibhav,
    Make sure that the field defined in your node in the context on the web dynpro view or if defined at the component controller level has the search help defined. Usually if the search help is tied to the database table's field name the 'Input Help Mode' of type automatic should display the determined search help.
    If that setting is there then in the adobe form create an input field of the type Webdynpro native->"Value help drop down list". Then bind your database field to this input field.
    When you do that the object type of the field changes to text_field change that back to a drop down field from the pick list provided for the objects and then activate it and test it out.
    Hope this helps.
    Thanks and best regards,
    Leena

  • Return Record type - Help required

    Hi ,
    I have a package which uses a record type
    TYPE cont_rec IS RECORD
         (cont_id Number
         ,cont_number Number
         ,cont_number_modifier Number
    ,s_l_id Number);
    TYPE cont_tbl IS TABLE OF cont_rec INDEX BY BINARY_INTEGER;
    and then calls a function
    go_cont(p_id In Number,
    x_name in Varchar2,
    x_con out cont_tbl);
    I want to use this function in a procedure and receive the result set of go_cont. how can i do this??

    Here is one example:
    SQL>
    SQL> create or replace package prec is
      2 
      3  type cont_rec is record
      4  (cont_id Number
      5  ,cont_number Number
      6  ,cont_number_modifier Number
      7  ,s_l_id Number);
      8 
      9  type cont_tbl is table of cont_rec index by binary_integer;
    10 
    11  function go_cont(
    12  p_id In Number,
    13  x_name in Varchar2
    14  ) return cont_tbl;
    15 
    16  end;
    17  /
    Package created.
    SQL> show errors
    No errors.
    SQL>
    SQL> create or replace package body prec is
      2 
      3  function go_cont(
      4  p_id In Number,
      5  x_name in Varchar2
      6  ) return cont_tbl
      7  is
      8  v_r cont_rec;
      9  v_t cont_tbl;
    10  begin
    11    v_r.cont_id := 1;
    12    v_r.cont_number := 1;
    13    v_r.cont_number_modifier := 1;
    14    v_t(1) := v_r;
    15    v_r.cont_id := 2;
    16    v_r.cont_number := 2;
    17    v_r.cont_number_modifier := 2;
    18    v_t(2) := v_r;
    19    return v_t;
    20  end;
    21 
    22  end;
    23  /
    Package body created.
    SQL> show errors
    No errors.
    SQL>
    SQL> set serveroutput on
    SQL>
    SQL> declare
      2  tab prec.cont_tbl;
      3  begin
      4  tab:= prec.go_cont(1, NULL);
      5  for i in tab.first..tab.last
      6  loop
      7   dbms_output.put_line(tab(i).cont_id);
      8  end loop;
      9  end;
    10  /
    1                                                                              
    2                                                                              
    PL/SQL procedure successfully completed.
    SQL>
    SQL> exit

  • Query returning wrong results - Help required.

    Hi All,
    I am having a query in which I have 10 records, 5 with stop time 1 and 5 with stop time 2.
    I have a scenario in which, I need to calculate the maximum,minimum for the records
    with stop time 1 and 2.
    What I did is, I selected all the 10 records using for loop. Within the loop
    I am trying to find the maximum and minimum. It is giving me wrong results.
    Please help me. My code is follows
    declare
         v_p1_min_stop_tm     number;
         v_p1_max_stop_tm     number;
         v_p2_min_stop_tm     number;
         v_p2_max_stop_tm     number;
    begin
         for i in(
              select
                   stop_tm
              from
                   sample_stop
              where
                   map_nbr = 16645 and
                   stop_dt = '05-sep-08'
         )loop
              if i.stop_tm = 1 then
                   select
                        min(i.stop_tm),
                        max(i.stop_tm)
                   into
                        v_p1_min_stop_tm,
                        v_p1_max_stop_tm
                   from
                        dual;
              elsif i.stop_tm = 2 then
                   select
                        min(i.stop_tm),
                        max(i.stop_tm)
                   into
                        v_p2_min_stop_tm,
                        v_p2_max_stop_tm
                   from
                        dual;
              end if;
         end loop;
         dbms_output.put_line('minimum p1 stop time : '|| v_p1_min_stop_tm);
         dbms_output.put_line('maximum p1 stop time : '|| v_p1_max_stop_tm);
         dbms_output.put_line('minimum p2 stop time : '|| v_p2_min_stop_tm);
         dbms_output.put_line('maximum p2 stop time : '|| v_p2_max_stop_tm);
    end;
    My o/p is :
    Minimum P1 stop time : 523
    Maximum P1 stop time : 523
    Minimum P2 stop time : 719
    Maximum P2 stop time : 719
    Here how can I make the data as two sets, one set with stop time 1 and
    other with stop time 2.
    Regards
    Raghu

    If the data type of stop_tm is varchar then try following
    declare
         v_p1_min_stop_tm number;
         v_p1_max_stop_tm number;
         v_p2_min_stop_tm number;
         v_p2_max_stop_tm number;
    begin
         for i in(select  stop_tm  from  sample_stop
              where
                   map_nbr = 16645 and
                   stop_dt = '05-sep-08'
              )loop
         if i.stop_tm = 1 then
              select min(to_number(i.stop_tm)), max(to_number(i.stop_tm))
                   into v_p1_min_stop_tm,v_p1_max_stop_tm
              from
                   dual;
         elsif i.stop_tm = 2 then
              select
                   min(to_number(i.stop_tm)),     max(to_number(i.stop_tm))
                   into
                   v_p2_min_stop_tm,v_p2_max_stop_tm
              from
                   dual;
         end if;
    end loop;
    dbms_output.put_line('minimum p1 stop time : '|| v_p1_min_stop_tm);
    dbms_output.put_line('maximum p1 stop time : '|| v_p1_max_stop_tm);
    dbms_output.put_line('minimum p2 stop time : '|| v_p2_min_stop_tm);
    dbms_output.put_line('maximum p2 stop time : '|| v_p2_max_stop_tm);
    end;
    / Regards
    Singh

  • Saving dialog default values with requirements

    We frequently use a configuration file to log machine-dependent parameters (e.g., serial port configurations). This works great but the code I use is not universal and takes some time to implement and a lot of time to customize. I am writing a set of VIs to streamline the process. The challenge is, though, that I want this to work with a variable number of parameters and I want to be able to read the values into a dialog in which the controls are configured so that the user can only enter valid values for that specific control.
    I am attaching a library that starts to do what I want, but it definitely isn't there! Since I can't change the limits of individual controls in the array, this won't work if the data typ
    es or limits vary within the parameter list.
    A quick search of the Developer Zone didn't yield an answer that does quite what I want. Does anyone know of a good way to do this?
    Attachments:
    dialog_test.llb ‏262 KB

    When you come across a problem that needs fixing, there are always three possible courses of action:
    1. Dig in and fix it.
    2. Decide that it's more trouble than its worth and abandon the idea.
    3. Wait for a bit for the technology to get better knowing that in the long run the wait will save you time.
    From what you are describing you might be in a situation where #3 is a good approach.
    I have built a lot of configuration editors and as you have pointed out there is a limit as to how much commonality you can introduce. What you really need is the ability to dynamically call front-panel components--like you can call VIs using VI Server. Unfortunately LV can't do that--yet...
    I have seen a demonstration of something called sub-panels (new for V7) that
    will revolutionize the process of creating this type of application. It just might be worth it to wait a bit.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How to Restrict Master data in value help screen for a user???URGENT

    Hello Gurus,
    I have a requirement.When a authorized user logins to view the report, he should see only list of customers assigned to that user in the value help screen, instead of displaying whole master data.and the data is displayed perfectly fine for the authorized sales rep. By default, Value help screen displaying all the customer numbers.
    How can I restrict in the value help screen?
    Any help appreciated with points.
    Regards,
    PNK

    Hi Chandran,
                I got that Idea too. I created a authorized customer, I created a authorized Object and assigned to a role.But in the role, when I am changing the object to generate profile, it is asking to select list of customers from the customer table.If the customers are always constant then this would work,  but in my scenario, customers for the sales rep changes over time and when I ever reps open the query, they should see updated list of customers assigned to them only, as we update the master data everyday from source system and that shud reflect in the value help.
    I am trying User Exit to achieve this, but I am not getting proper ideas how to do this.
    Any Help on this issue with user exit code???
    Thanks in Advance
    regards,
    PNK

  • I need default values for APEX form fields. How do I do this?

    Hello,
    I am trying to set a default value in my form so that there will not get a null value. I have gone to the Column Defaults page and filled out the following fields in From Defaults:
    Default Value: 0
    Required: Yes
    Help Text: Please enter a number.
    When I add a record set or update a record and do not fill in the field, neither does it prompt me to fill it in or has a default value. It is blank.
    Can someone tell me what I am doing wrong?
    Thanks
    leh

    Hi leh,
    Defaults:
    Click on the page item, go to the Default section, enter your value into the Default value area.
    Validations:
    It's not quite as automatic as you are thinking.
    You'll need to add a Validation process for the item.
    First you go to the Page Processing section, then the Validations section, click the creation icon in the Validation section. You will first have the choice to create an item level or page level validation. Either will work. Next you will select the item you want to validate. Then, select Item Not Null. On one of the next pages you will be able to enter the error message. It's all pretty straightforward.
    Tony

  • [svn:fx-trunk] 7553: Fix the default value of the [skinPart] "required" attribute for asdoc.

    Revision: 7553
    Author:   [email protected]
    Date:     2009-06-04 09:32:51 -0700 (Thu, 04 Jun 2009)
    Log Message:
    Fix the default value of the "required" attribute for asdoc.
    Bugs: SDK-21488
    QE Notes: None.
    Doc Notes: None.
    tests: checkintests
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-21488
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/TopLevelGenerator.java

    ${ui:cond( uix.current.isNewRow, 'true', ui:cond( bindings.AddProjectNutsoverleg.value == 1, 'true', 'false' ) ) } notice the '.value' it could also be '.inputValue'.
    If not there is also an option to make sure that when the checkbox is empty a value is returned anyways this work like this:
      protected void processUpdateModel( DataActionContext ctx )
        //First look for the request parameter
        Object cbInRequest = ctx.getHttpServletRequest().getParameter( "nameofthecheckbox" );
        //We only need to do anything if it was not submitted
        if( cbInRequest == null )
          // Get hold of the Form Bean containing the record
          BindingContainerActionForm updateForm = (BindingContainerActionForm) ctx.getActionForm();
          //Get the binding for our particular column
          JUCtrlAttrsBinding checkBoxBinding = (JUCtrlAttrsBinding)updateForm.get( "nameofthecheckbox" );
          //Reset that explicitly to the *unchecked* value
          checkBoxBinding.setAttribute( 0, new oracle.jbo.domain.Number( 0 ) );
        super.processUpdateModel( ctx );
      }Maybe this helps.

  • How to set a default value in a Value Help Drop Down List

    Hi,
    I used an age Range field in my adobe form, the control  is a Value Help Drop Down List. i am populating the drop down using following code.
    IWDAttributeInfo ageInfo = wdContext.nodePersonalData().getNodeInfo().getAttribute("CTAgeRange");
         ISimpleTypeModifiable ageType = ageInfo.getModifiableSimpleType();     
         IModifiableSimpleValueSet ageValueSet =  ageType.getSVServices().getModifiableSimpleValueSet();
         ageValueSet.put("1","21-29");
         ageValueSet.put("2","30-34");
         ageValueSet.put("3","35 or Above");
    My requirement is to set a default value e.g. 30-34 in the age range field.
    I want to give input to iform from my Implementation code only.
    Please help.
    Thanks in advance

    hi Ranjan,
    that means you have to set at design time,
    to set default drop down value you will have to set the value for particular attribute (which is linked to the dropdown element) in the context
    like
    wdContext.currentContext<nodeName>Element.set<FieldName>(<default value>)
    This generally done in Initialization method of the controller.

  • Vivado 2015.1 Bug Report: Adding Required Port without Default Value in Custom Interface Definition

    When adding a port using the Custom Interface Definition window and not defining a Default Value, the attached error message appears.  Not only are the html tags visible, but this error should not be thrown in the first place if both Master/Slave Presense is set to "required".  As it is, a port can only be added if a Default Value is given, but can be removed later from the ports table.

    yes,I have successfully install petalinux2015.2,but,the issue still be the same as before,the axi 16550 is not working,when I run echo 123 > /dev/ttyS1,my ttyPS0 stop working and axi com keeping null output...
    then,I try petalinux2014.4+petalinux2014.4,the difference is the ttyPS0 still alive but axi-com still null...
    I found that pl.dtsi file is quite different between the three mode:
    M1,petalinux2014.4+vivado2015.1
    M2,petalinux2015.2+vivado2015.1
    M3,petalinux2014.4+vivado2014.4
    most confuse for me is the interrupt ID,
    in vivado I connect the axi intterrupt to ID 62 but I get different auto generate dts file
    M1:nothing about interrupt and i add manuually in system-top.file
    M2:vivado ID is 61 but dts "interrupts = <0 30 4>"
    M3:vivado ID is 62 but dts "interrupts = <0 31 4>"
    does petalinux auto detect the vivado interrupt connection and ID and write to dts file right or User have to verify and rewrite in ststem-top.dts?
    working hard for the issue and hope for a axi demo including petalinux + vivado ,help please

  • Search help default value in SE11

    Hello!
    I would like to set a default value to a self-made search help.
    I referred the following link in this theme:
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/73/5414f0adbd11d194f200a0c929b3c3/frameset.htm
    This docu tells me, how can I enter default value to a field. But life is not so easy, because I have to EXCLUDE a constant.
    I mean default value can be a constant like this: 'A'.
    But I would like to set one like this: <>'C' to exclude all documents with the status C.
    If I test the help search in runtime it is accepting values to exclude but I would like to pre-set the value.
    Thank you for any answers
    Tamá

    Hi,
    There is no simple solution for this. If you have a view in your selection method instead of the table then you can define your requirement in the selection TAB to restrict based on your conditions.
    Without using a view the other option is to use a search help exit.
    Think view is a better and safe bet.
    Cheers
    VJ

  • Search Help default value

    Hi experts,
    I want to create a search help for the Material. In the search help I should set some default value like the language and the company. I know how can I set the default language, but how can I say that the default language could not be 'EN'.
    I need to set this one: SPRAS NE 'EN', but I don't know how.

    Hi,
    Create a help view first and include the tables ,in the selection conditions tab page restrict the data entry by adding all the condition such as EQ,NE.GT,LT AND ,OR operator as per your requirement.
    Then add this help view to the selection method in the search help created.
    eg:SPRAS NE 'EN'
    Hope this will help you!!!
    Try this It works!!
    Regards,
    Nishi.M

  • Limiting the value help for a user input variable as required

    Hello Gurus,
    I have a requirement :-
    Restrict the value help for a user input variable in a query to only a required set of values instead of the default behaviour. ie instead of having all the values in the master data of that characteristics in the value help.
    How do I go about it? - Do I have to explore the precalculated value set feature?
    If so, please tell me how to go about it in BI 7.I would appreciate if you could explain it in detail rather than sending me a URL because I have gone through most of them but Iam yet to figure out how to create the broadcast setting and subsequent steps.
    Thanks for your time.
    Regards,
    Kris_Hitman

    I believe if the User doesn't want to see any particular values in F4 help then it means they are not intrested in viewing the transaction data related to those values.
    So why don't you restrict that object with the required values. Then the F4 help will automatically display only those values.

Maybe you are looking for