Reading Null Values From Request Object

For a proof-of-concept, I wrote a mini program that has 2 files. File #1 is main.html. There's a javascript function called addNewRowToThisTable that isn't displayed but it basically allows the user to create as many rows in the table as user desires. When the "Submit" button is clicked the file ReadIt.jsp is called and it's supposed to display on the first and last names of the people who had the checkbox for that row checked. The best way to illustrate the problem I'm having is through an example. Let's say there are 3 rows:
[x] Alan Anderson [Add New Row]
[ ] Bob Brady [Add New Row]
[x] Carl Chadwick [Add New Row]
[Submit]
Let's assume that only rows 1 and 3 are clicked. After the form is submitted the JSP will print...
firstNameArr .length = 3
lastNameArr .length = 3
isSelectedArr.length = 2
firstNameArr[0] = Alan
lastNameArr[0] = Anderson
firstNameArr[1] = Bob
lastNameArr[1] = Brady
Unfortunately firstNameArr[1] and lastNameArr[1] should be "Carl", and "Chadwick" respectively. I know the reason why it's failing is because my program relies on the array index of the "isSelected" field to perfectly match up with the "firstName" and "lastName" fields. It's unreliable because if the checkbox for a row is not checked then it won't show up in the JSP String array isSelectedArr. I'm not really sure how to get around this problem. I have 2 ideas at the beginning of solutions but I'm not sure how to follow through on either and I'm also not sure if either is the proper approach to take. My guesses are...
1) There's some way in JSP to use "getParameterValues('isSelected')" to retrieve the full array of "isSelected" items regardless of whether or not they're checked. That would guarantee that my arrays would match up correctly. Unfortunately, I haven't been able to find this.
2) Maybe I can put in some sort of ID in the "isSelected" field that would relate the checkbox to the rest of the data in the row. The problem with this is that I've got a dynamic # of rows due to my addNewRowToThisTable method.
So the bottom line is that I'm thoroughly stumped. If anyone can offer advice I'd be very grateful.
main.html
<html><head><title></title></head><body>
<form method="get" action="ReadIt.jsp">
<table>
<tr>
     <td><input type="checkbox" name="isSelected" /></td>
     <td><input type="text" name="firstName" /> </td>
     <td><input type="text" name="lastName" /></td>
     <td><input type="button" value="Add New Row" onClick="addNewRowToThisTable(this)" />
</tr>
<tr>
     <td colspan=4><input type="submit" value="submit"></input></td>
</tr>
</table>
</form>
</body></html>
ReadIt.jsp
<%
String[] isSelectedArr = request.getParameterValues("isSelected");
String[] firstNameArr = request.getParameterValues("firstName");
String[] lastNameArr = request.getParameterValues("lastName");
if (firstNameArr != null) System.out.println("firstNameArr .length = " + firstNameArr .length);
if (lastNameArr != null) System.out.println("lastNameArr .length = " + lastNameArr .length);
if (isSelectedArr != null) {
     System.out.println("isSelectedArr.length = " + isSelectedArr.length);
     for (int i=0; i < isSelectedArr.length; i++) {
          System.out.println("firstNameArr["+i+"] = " + firstNameArr);
          System.out.println("lastNameArr["+i+"] = " + firstNameArr[i]);
%>

it's sort of a kludge, but try this:
your javascript function adds new for fields that get submitted to the servlet. name the checkboxes uniquely with a patterm with said function, say isSelected-1, isSelected-2, isSelected-3... now also name the first and last name fields the same way. fname-1, fname-2, fname-3... lname-1,lname-2,lname-3.
when you get to the page that is supposed to match them up, go through all the request parameters looking for those that start with "isSelected-" take the last char (the index), convert it to an int, and then from your request do:
String first = request.getParameter("fname-" + indexThatWasFound);
          String last = request.getParameter("lname-" + indexThatWasFound);in looping over the request for each index recovered from the searching of the request for the isSelected-n values, you will get the matching first and last name.
I TOLD you it was a kludge.

Similar Messages

  • Geting null values from request

    hi!
    i m producing this code through out.println() method in my page and then using java script
    i am submiting this page to another page
    <td width="56%"><textarea name="question_no_1"></textarea></td>
    <input name="question_no_1_radio1" type="radio" value="radio"></td>
    <td width="59%"> <textarea name="question_no_1_ans1"></textarea></td>
    <input type="radio" name="question_no_1_radio2" value="radio"></td>
    <td><textarea name="question_no_1_ans2"></textarea></td>
    <input type="radio" name="question_no_1_radio3" value="radio"></td>
    <td><textarea name="question_no_1_ans3"></textarea></td>
    <input name="question_no_1_radio4" type="radio" value="radio"></td>
    <td><textarea name="question_no_1_ans4"></textarea></td>
    but when i submit it to the other page and try to retrieve value of parameter "question_no_1"
    through the bellow statement it shows a null value but i have given a value previously by
    typing a question in it
    System.out.println("the Body Of The First Question Is "+request.getParameter("question_no_1"));
    can anybody help me what is going on here.
    also if i try to normaly submit first page (ie <form="form1" method="post" action="other_jsp_page.jsp"> ) then the statement in the next page gives me the correct value but
    i have to submit the first paper through java script.
    if u want to see full detail of my code then go to the following link
    http://forum.java.sun.com/thread.jsp?thread=309254&forum=45&message=1237097
    thanx in advance

    OK, your problem is that you are not submmiting the values to the other page. When you do the
    --> document.forms[0].submit();
    in JavaScript, the form has to action defined
    --> <form name="form1" method="" action="">
    So, the page does nothing. The line following the submit just changes the location of the page, IT DOES NOT POST the values.
    One solutions is the following:
    1.- define an action for your form:
    <form name="form1" method="POST" action="'save_paper.jsp">
    2.- Then create a JavaScript function that validates the fields and simply return "true" if the form is correct, and false if there is a problem (just a little modification of the one you have).
    3.- Then modify your submit button:
    Instead of:
    <input type="button" name="Save" value="Save" onClick="validateField()">
    Try:
    <input type="SUBMIT" value="Save" onclick="validateField();">

  • Clearing variable from Request object

    Hi everyone,
    After getting value from request.getParameter("var"), I want to clear this "var" variable from request scope. So that in the next coming statements if i again call the same request.getParameter("var") statement than it must return null
    So how to handle this issue of clearing certain variable from request scope or flushing the whole request object

    I don't know what you are trying to do but it sounds confused. I would suggest you read the parameter once, at the beginning of the code. Store it in a variable and use that variable as necessary. If you still need help then would you explain what you are trying to achieve here.

  • Problem reading RFC values from IRecordSet !!!!

    Hi All,
    I am having some problem reading values from IRecordSet. Can not seem to parse the output structure from RFC. AM using connector gateway service to execute BAPI_EXCHRATE_GETCURRENTRATES.
    Here is the code,
    MappedRecord input = rf.createMappedRecord("input");
    input.put("DATE",new String("01011990"));
    input.put("DATE_TYPE", new String("V"));
    input.put("RATE_TYPE", new String("M"));
    MappedRecord output = (MappedRecord) ix.execute(ixspec, input);
    Object rs = null;
    IRecordSet recSet = null;
    Object result = output.get("EXCH_RATE_LIST");
    if (result == null) {
    response.write("<BR>null");
    rs = new String(" ");
    } else if (result instanceof IRecordSet) {
    IRecordSet irs = (IRecordSet) result;
    response.write("<BR>Got some dataaa");
    IRecordMetaData rsmd = null;
    rsmd = irs.retrieveMetaData();
    irs.beforeFirst();
    while(irs.next()){
    response.write("Row::"+irs.getString("RATE_TYPE")+" "+irs.getString("FROM_CURR")+" "+irs.getString("EXCH_RATE"));
    Am getting the pritn statement, Got Some Data on the PDK component.
    But somehow not able to read the values from IRecordSet
    What is the mistake here?
    Pls help
    Edited by: Aakash Jain on Oct 11, 2008 12:22 AM

    Hi
    Try in this way.
    IRecordSet resultTable = (IRecordSet)outputParams.get("TABLE_NAME");
    for(resultTable.beforeFirst(); resultTable.next(); ) {
    response.write(resultTable.getString(0));
    response.write(resultTable.getString(1));
    Thanks

  • How to post null values from h:inputText?

    Hello,
    I have a form made of h:inputText fields that map to an entity class as the backing bean. Whenever I post the form from a web page, all the fields that I did not fill out and that are mapped to String fields in the entity class are set to "" (empty string) instead of null.
    However, I would like to post null values to my entity, because that would indicate that the user did not fill out the field. In other contexts (outside of the web app) it is possible to set the fields to empty strings, but from the web app it should always be null. How can I get JSF to do this correctly?
    Also, when reading entitys with null values from the database, these are converted to empty h:inputText fields, so this direction works as expected.
    Ulrich

    I haven't seen a solution for this as far.
    This is how I do it:
    public void action() {
        if (isEmpty(inputValue)) {
            // do your thing
        } else {
            // do your thing
    public static boolean isEmpty(Object value) {
        if (value == null) {
            return true;
        if (value instanceof String && ((String) value).trim().length() == 0) {
            return true;
        if (value instanceof Collection && ((Collection) value).size() == 0) {
            return true;
        // And go so on .. make it an utility method.
        return false;
    }

  • Need help Take out the null values from the ResultSet and Create a XML file

    hi,
    I wrote something which connects to Database and gets the ResultSet. From that ResultSet I am creating
    a XML file. IN my program these are the main two classes Frame1 and ResultSetToXML. ResultSetToXML which
    takes ResultSet & Boolean value in its constructor. I am passing the ResultSet and Boolean value
    from Frame1 class. I am passing the boolean value to get the null values from the ResultSet and then add those
    null values to XML File. When i run the program it works alright and adds the null and not null values to
    the file. But when i pass the boolean value to take out the null values it would not take it out and adds
    the null and not null values.
    Please look at the code i am posing. I am showing step by step where its not adding the null values.
    Any help is always appreciated.
    Thanks in advance.
    ============================================================================
    Frame1 Class
    ============
    public class Frame1 extends JFrame{
    private JPanel contentPane;
    private XQuery xQuery1 = new XQuery();
    private XYLayout xYLayout1 = new XYLayout();
    public Document doc;
    private JButton jButton2 = new JButton();
    private Connection con;
    private Statement stmt;
    private ResultSetToXML rstx;
    //Construct the frame
    public Frame1() {
    enableEvents(AWTEvent.WINDOW_EVENT_MASK);
    try {
    jbInit();
    catch(Exception e) {
    e.printStackTrace();
    //Component initialization
    private void jbInit() throws Exception {
    //setIconImage(Toolkit.getDefaultToolkit().createImage(Frame1.class.getResource("[Your Icon]")));
    contentPane = (JPanel) this.getContentPane();
    xQuery1.setSql("");
    xQuery1.setUrl("jdbc:odbc:SCANODBC");
    xQuery1.setUserName("SYSDBA");
    xQuery1.setPassword("masterkey");
    xQuery1.setDriver("sun.jdbc.odbc.JdbcOdbcDriver");
    contentPane.setLayout(xYLayout1);
    this.setSize(new Dimension(400, 300));
    this.setTitle("Frame Title");
    xQuery1.setSql("Select * from Pinfo where pid=2 or pid=4");
    jButton2.setText("Get XML from DB");
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    catch(java.lang.ClassNotFoundException ex) {
    System.err.print("ClassNotFoundException: ");
    System.err.println(ex.getMessage());
    try {
    con = DriverManager.getConnection("jdbc:odbc:SCANODBC","SYSDBA", "masterkey");
    stmt = con.createStatement();
    catch(SQLException ex) {
    System.err.println("SQLException: " + ex.getMessage());
    jButton2.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    jButton2_actionPerformed(e);
    contentPane.add(jButton2, new XYConstraints(126, 113, -1, -1));
    //Overridden so we can exit when window is closed
    protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
    System.exit(0);
    void jButton2_actionPerformed(ActionEvent e) {
    try{
    OutputStream out;
    XMLOutputter outputter;
    Element root;
    org.jdom.Document doc;
    root = new Element("PINFO");
    String query = "SELECT * FROM PINFO WHERE PID=2 OR PID=4";
    ResultSet rs = stmt.executeQuery(query);
    /*===========This is where i am passing the ResultSet and boolean=======
    ===========value to either add the null or not null values in the file======*/
    rstx = new ResultSetToXML(rs,true);
    } //end of try
    catch(SQLException ex) {
    System.err.println("SQLException: " + ex.getMessage());
    ======================================================================================
    ResultSetToXML class
    ====================
    public class ResultSetToXML {
    private OutputStream out;
    private Element root;
    private XMLOutputter outputter;
    private Document doc;
    // Constructor
    public ResultSetToXML(ResultSet rs, boolean checkifnull){
    try{
    String tagname="";
    String tagvalue="";
    root = new Element("pinfo");
    while (rs.next()){
    Element users = new Element("Record");
    for(int i=1;i<=rs.getMetaData().getColumnCount(); ++i){
    tagname= rs.getMetaData().getColumnName(i);
    tagvalue=rs.getString(i);
    System.out.println(tagname);
    System.out.println(tagvalue);
    /*============if the boolean value is false it adds the null and not
    null value to the file =====================*/
    /*============else it checks if the value is null or the length is
    less than 0 and does the else clause in the if(checkifnull)===*/
    if(checkifnull){ 
    if((tagvalue == null) || tagvalue.length() < 0 ){
    users.addContent((new Element(tagname).setText(tagvalue)));
    else{
    users.addContent((new Element(tagname).setText(tagvalue)));
    else{
    users.addContent((new Element(tagname).setText(tagvalue)));
    root.addContent(users);
    out=new FileOutputStream("c:/XMLFile.xml");
    doc = new Document(root);
    outputter = new XMLOutputter();
    outputter.output(doc,out);
    catch(IOException ioe){
    System.out.println(ioe);
    catch(SQLException sqle){

    Can someone please help me with this problem
    Thanks.

  • How to get attribute value from an object inside an object in Xpress

    Does anyone know how to get an attribute value from an object in Xpress in a workflow? I have an object structured as follows:
    <ResourceInfo accountId='mj628' tempId='3483372b787ce7dd:-5d99a0c5:130cb238483:-3600'>
    <ObjectRef type='Resource' name='Google Apps'/>
    </ResourceInfo>
    I need if possible to get the name='Google Apps', which is inside the ObjectRef, so I guess its an attribute value of an object inside an object.

    If the ResourceInfo object is accessible in a variable, i.e. named "myResInfo", you just have to check the Java API and call the relevant method:
    <invoke name='getResourceName'>
      <ref>myResInfo</ref>
    </invoke>

  • How to retrieve line Item values from an object using groovy

    def RevenueObject = nvl(ChildRevenue,0);
    println('revenueItems==='+revenueItems.size());
    while(RevenueObject.hasNext())
    def revenueLine = RevenueObject.next();
    revenueLine.setAttribute('Test_c', 'Hello');
    } Groovy Scripting
    Error : Getting null value for Revenue object
    Exception in expression "OpportunityEO" trigger "getRevenueItems" : groovy.lang.MissingMethodException : No signature of method: oracle.jbo.server.ViewRowSetIteratorImpl.size() is applicable for argument types: () values: [] Possible solutions: is(java.lang.Object), find(), use([Ljava.lang.Object;), with(groovy.lang.Closure), sleep(long), find(groovy.lang.Closure)
    at "OpportunityEO" trigger "getRevenueItems" line 7
    No signature of method: oracle.jbo.server.ViewRowSetIteratorImpl.size() is applicable for argument types: () values: [] Possible solutions: is(java.lang.Object), find(), use([Ljava.lang.Object;), with(groovy.lang.Closure), sleep(long), find(groovy.lang.Closure)

    Depending on the message the line number might be in one of the fields:
    MESSAGE_V1
    MESSAGE_V2
    MESSAGE_V3
    MESSAGE_V4
    Although if the message simply is not meant to include the line number, it won't be there. That's the way it is. If there is a user exit available, you may add your custom messages with the line number. In some user exits (in sales order for sure) there is a special variable (flag), which is set when the BAPI runs the transaction.

  • How can I delete null values from List Item?

    Hi Friends,
    I used List item for field job_Type, I entered values in List item at design time through property pallet. When I run form I will see null values in this List Item.
    How can I remove these null values from the List?
    Best regards,
    Shahzad

    Dear Shahzad,
    It can be removed by adding the following code in the When-new-Form-Instance.
    Set_item_property('List name', required, property_true);
    :block_name.list_name := <put your default value here>; (If you didn't oput the default value, then you will get some problem and the cursor may not navigate away from the list).
    Senthil Alagu .P.

  • Wants to eliminate null values from mapping queue

    Hi All,
    How can I eliminate null values from 'display queue' of a target mapping.
    Can it be done through a UDF? Kindly help.
    Because of null value, it is creating issue in the mapping logic.
    Thanks,
    John

    We can remove null values using node functions.
    Check the below thread:
    Re: How to remove [] form Message Mapping Display Queue
    Or
    Try with the below UDF:
    for (int i=0; i<a.length;i++)
    if (! a<i>.equals(ResultList.SUPPRESS) || ! a<i>.equals(""))
    result.addValue(a<i>);
    Thanks,

  • Remove null values from query

    Hi All;
    Below is my query and the output and i need to remove null values from the output
    Any help regarding same is much appreciated
    Thanks
    ; WITH CTE AS
    select a.opportunityid,a.new_entrypoint_displayname,c.parentcustomerid,c.contactid,c.fullname,a.new_mainprogramme_idname,
    a.new_subprogramme_idname,
    a.owneridname,
    a.new_dateofapplication,count(appt.activityid) as NoOfAppointments,
    ap.scheduledstart,
    ap.scheduleddurationminutes
    from opportunity a
    left join contact c on (c.contactid = a.parentcontactid)
    inner join activitypointer ap on ( ap.regardingobjectid = c.contactid )
    inner join appointment appt on (appt.activityid = ap.ActivityId)
    where
    appt.new_didmeetingtakeplace = 1
    and appt.statecode = 1 and
    (a.SCRIBE_DELETEDON is null and c.SCRIBE_DELETEDON is null and ap.SCRIBE_DELETEDON is null and appt.SCRIBE_DELETEDON is null)
    group by a.opportunityid,a.new_entrypoint_displayname,c.parentcustomerid, c.contactid,c.fullname,a.owneridname,
    a.new_mainprogramme_idname,a.new_subprogramme_idname,
    a.new_dateofapplication,ap.scheduledstart,
    ap.scheduleddurationminutes
    union
    select a.opportunityid,a.new_entrypoint_displayname,c.parentcustomerid,c.contactid,c.fullname,
    a.new_mainprogramme_idname,a.new_subprogramme_idname,a.owneridname,
    a.new_dateofapplication,count(appt.activityid) as NoOfAppointments,
    ap.scheduledstart,
    ap.scheduleddurationminutes
    from opportunity a
    left join contact c on (c.contactid = a.parentcontactid)
    inner join activitypointer ap on (ap.regardingobjectid = a.opportunityid)
    inner join appointment appt on (appt.activityid = ap.ActivityId)
    where
    appt.new_didmeetingtakeplace = 1
    and appt.statecode = 1 and
    (a.SCRIBE_DELETEDON is null and c.SCRIBE_DELETEDON is null and ap.SCRIBE_DELETEDON is null and appt.SCRIBE_DELETEDON is null)
    group by a.opportunityid,a.new_entrypoint_displayname,c.parentcustomerid,c.contactid,a.owneridname,
    a.new_mainprogramme_idname,a.new_subprogramme_idname,
    c.fullname,a.new_dateofapplication,
    ap.scheduledstart,
    ap.scheduleddurationminutes
    CTE2 As
    select opportunityid,parentcustomerid,new_entrypoint_displayname,contactid,fullname,
    new_mainprogramme_idname,new_subprogramme_idname,cte.owneridname,
    ac.new_businessstartdate,new_dateofapplication,(NoOfAppointments),
    case when ac.new_businessstartdate > = CTE.scheduledstart
    then (CTE.scheduleddurationminutes) end as PreStartHours,
    case when ac.new_businessstartdate < CTE.scheduledstart
    then (CTE.scheduleddurationminutes) end as PostStartHours
    pp.new_outputs,
    case when po.new_outputsname = 'Pre Start Assist'
    then 'Yes' else 'No' end as Precheck,
    case when po.new_outputsname = 'Business Assist'
    then 'Yes' else 'No' end as Buscheck
    from CTE
    join account ac on (ac.accountid = CTE.parentcustomerid)
    join dbo.new_programmeoutput as po on (CTE.opportunityid = po.new_relatedopportunity)
    join dbo.new_programmeprofile pp on (
    po.new_mainprogrammeid = pp.new_mainprogrammeid and
    po.new_subprogrammeid = pp.new_subprogrammeid
    and pp.new_claimstartdate = po.new_claimdate
    and pp.new_outputsname = po.new_outputsname)
    where (ac.SCRIBE_DELETEDON is null)
    group by opportunityid,parentcustomerid,new_entrypoint_displayname,contactid,fullname,ac.new_businessstartdate,new_dateofapplication,NoOfAppointments,
    scheduledstart,new_mainprogramme_idname,new_subprogramme_idname,cte.owneridname,scheduleddurationminutes
    select opportunityid,parentcustomerid,new_entrypoint_displayname,contactid,fullname,
    new_mainprogramme_idname,new_subprogramme_idname,cte2.owneridname,
    new_businessstartdate,new_dateofapplication,(NoOfAppointments),
    PreStartHours, PostStartHours,po.new_programmeoutputid,
    case when (new_outputsname) = 'Pre Start Assist'
    then 'Yes' else 'No' end as Precheck,
    case when (new_outputsname) = 'Business Assist'
    then 'Yes' else 'No' end as Buscheck --po.*
    from cte2
    left join dbo.new_programmeoutput as po on (cte2.opportunityid = po.new_relatedopportunity)
    where po.new_claimmonthidname is not null and po.statuscode_displayname = 'claimed'
    group by opportunityid,parentcustomerid,new_entrypoint_displayname,contactid,fullname,
    new_mainprogramme_idname,new_subprogramme_idname,cte2.owneridname,
    new_businessstartdate,new_dateofapplication,(NoOfAppointments),
    PreStartHours, PostStartHours,po.new_programmeoutputid,new_outputsname
    --where new_claimmonthidname is not null --and CTE2.PreStartHours is not null and CTE2.PostStartHours is not null
    Pradnya07

     i need to remove null values from the output
    Hello,
    What exactly do you mean with "remove", to filter the rows out from result set or to replace the null value by an other value e.g. 0? This can be done with the
    ISNULL function:
    ISNULL(case when ac.new_businessstartdate > = CTE.scheduledstart
    then (CTE.scheduleddurationminutes) end, 0) as PreStartHours, ...
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Prevent null values from displaying in answers OBIEE 11g

    Is there any possibilities in OBIEE to Prevent null values from displaying in answers
    For example, If i have two records in table
    TV         cost=NULL(having agg rule sum in BMM layer)
    RADIO   cost=10(having agg rule sum in BMM layer)
    in answers i get two records
    TV       NULL
    RADIO 10
    but i want to get one, only with not null cost

    Just want to clarify your question,You want to eliminate the NULL values from the report am i right? If that is the case then put the filter COST <> NULL.
    Do let me know the updates?
    Thanks,

  • Reading any value from table into a string (Especially date etc..)

    How would I read any value from a table into a string?
    Currently doing the following...
    data ret_val type string.
    select single (wa_map-qes_field) from z_qekko into ret_val
    where
    angnr = _angnr.
    When the source field is a date it bombs though.
    The result goes into a BDCDATA-fval.
    regards
    Dylan.

    Tried...
    1    DATA: lp_data TYPE REF TO DATA.
    2    FIELD-SYMBOLS: <value> TYPE ANY.
    3    CREATE DATA lp_data LIKE (wa_map-qes_field).
    4    ASSIGN lp_data->* TO <value>.
    5    SELECT SINGLE (wa_map-qes_field) FROM zquadrem_qekko INTO <value> WHERE angnr = _angnr.
    Complains that (wa_map-qes_field) is not defined in line 3.
    Think that the bracket thing is only available via SQL.
    What about CREATE DATA lp_data type ref to object. ?
    Would the above declaration work?
    regards

  • Null values from DB2 cause problems

    Hi,
    I have another problem with database link to DB2 using IBM iSeries Access for Linux on 64 bit OEL5 with Oracle Database gateway and unixODBC 2.2.14.
    DB link works. However, null values from DB2 cause problems. Date columns that are null on db2 return a date '30.11.0002', and character columns that are null return an error ORA-28528: Heterogeneous Services datatype conversion error.
    isql returns correct results.
    How can i fix this? Perhaps set some parameters for data conversion on the gateway?
    Thank you.

    If the driver is not fully ODBC level 3 compliant and misses functions, we're lost. But sometimes the drivers are ODBC level 3 compliant but miss the correct 64bit implementation. In those cases we can tell the gateway to use the 32bit ODBC level 3 standard by setting in the gateway init file:
    HS_FDS_SQLLEN_INTERPRETATION=32

  • How to replace NULL values from main table

    Dear all,
    I like to remove the NULL values from a main table field. Or the question is how to replace any part of the string field in MDM repository main table field.
    e.g.   I have a middle name field partly the value is NULL in some hundreds of records, I like to replace NULL values with Space
    any recommendation.
    Regards,
    Naeem

    Hi Naeem,
    You can try using Workflows for automatically replacing NULLs with any specific value.
    What you can do is: Create a workflow and set trigger action as Record Import, Record Create and Record Update. So, that whenever any change will occur in the repository; that workflow will trigger.
    Now create an assignment expression for replacing NULLs with any specific value and use that assignment expression in your workflow by using Assign Step in workflow.
    For exiting records, you will have to replace NULLs manually using the process given by Preethi else you can export those records in an Excel spreadsheet which have NULLs and then replace all NULLs with any string value and then reimport those records in your MDM repository.
    Hope this will solve your problem.
    Regards,
    Varun
    Edited by: Varun Agarwal on Dec 2, 2008 3:12 PM

Maybe you are looking for