JTextField.setDocument(null) in 1.3 and 1.4

Hi
We are upgrading to Java 1.4 from 1.3. The method JTextField.setDocument(doc) works fine in 1.3 when 'doc' is null. But in 1.4, it throws null pointer exception. I am not using JTextField directly, I am using a derived class of JTextField. 'doc' is a class var that implements interface Document.
Can anybody tell how to solve this problem in 1.4?
Thanks

Well, a Document is used to store the text entered into the JTextField. If the Document is null then you can't store any text. If you can't store any text then you don't need the JTextField. If you don't need the JTextField, remove it from the screen.
Of course a simpler solution would be to not set the Document to null. Why do you set it do null?

Similar Messages

  • How to transfer database table contain null values, primary key, and foreign key to the another database in same server. using INSERT method.

    how to transfer database table contain null values, primary key, and foreign key to the another database in same server. using INSERT method.  thanks

    INSERT targetdb.dbo.tbl (col1, col2, col3, ...)
       SELECT col1, col2, col3, ...
       FROM   sourcedb.dbo.tbl
    Or what is your question really about? Since you talke about foreign keys etc, I suspect that you want to transfer the entire table definition, but you cannot do that with an INSERT statement.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Slight Issue with JTextField Returning Null

    Hey everyone,
    I just have a slight problem involving a null value returned when I call the getText method of a textField, even when there is text in the field.
    Here is the code to create the GUI
      public static void createGUI()
           JFrame frame = new JFrame("Chatter");
           frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
           JPanel panel = new JPanel(new BorderLayout());
           panel.add(new ChatterGui(), BorderLayout.CENTER);
           panel.add(new JPanel(), BorderLayout.NORTH);
           panel.add(new JPanel(), BorderLayout.SOUTH);
           panel.add(new JPanel(), BorderLayout.EAST);
           panel.add(new JPanel(), BorderLayout.WEST);
           frame.add(panel);
           frame.pack();
           frame.setVisible(true);
      }Here is the constructor of the ChatterGui class
      public ChatterGui()
           super(new GridBagLayout());
           JTextField chatInput = new JTextField(50);
           chatInput.addActionListener(this);
           chatInput.setFocusable(true);
           JTextArea chatList = new JTextArea(30, 50);
           chatList.setEditable(false);
           JScrollPane scrollPane = new JScrollPane(chatList);
           JButton submit = new JButton("Submit");
           submit.addActionListener(this);
           GridBagConstraints c = new GridBagConstraints();
           c.gridwidth = GridBagConstraints.REMAINDER;
           c.fill = GridBagConstraints.BOTH;
           add(scrollPane, c);
           c.weightx = 1.0;
           c.weighty = 1.0;
           c.fill = GridBagConstraints.HORIZONTAL;
           add(new JPanel(), c);
           c.fill = GridBagConstraints.HORIZONTAL;
           add(chatInput, c);
           c.fill = GridBagConstraints.HORIZONTAL;
           add(new JPanel(), c);
           c.fill = GridBagConstraints.HORIZONTAL;
           add(submit, c);
      }and here is the code for the actionListener for the JButton and the JTextField
      public void actionPerformed(ActionEvent evt)
           chatInput.selectAll();
           String in = chatInput.getText();
           Grammar.parseQuestion(in);
           chatList.append("User: " + in + "\n");
           chatList.append("Computer: " + Global.currentResponse + "\n");
           Global.flushResponse();
           chatInput.setText("");
      }Any help would be appreciated, here's a link to the full code if its needed [http://pastebin.com/m9fc91a9].

         JTextField chatInput = new JTextField(50);This chatInput is a local variable.
         chatInput.selectAll();Whatever this 'chatInput' is, it isn't the one above.
    It seems to me that your real problem must be an NPE using 'chatInput'.

  • Null value for int and datetime date type in xml schema

    hi:
    I am embarrassed by a qustion in xml schema; i defined a xml schema file like
    this:
    <elementFormDefault="qualified" attributeFormDefault="qualified">
    <xs:element name="test">
    <xs:annotation>
    <xs:documentation>Comment describing your root element</xs:documentation>
    </xs:annotation>
    <xs:complexType>
    <xs:sequence>
    <xs:element name="name" type="xs:string"/>
    <xs:element name="password" type="xs:string" nillable="true"/>
    <xs:element name="user" type="xs:int" nillable="true"/>
    <xs:element name="s_time" type="xs:dateTime"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    and I send this file to workflow clientrequest() node, I wanted to receive data
    in this schema file.but when i send null value to the element "user" and "s_time"
    in workshop test tool(test soap),and use function in xmlbean like isNilUser or
    isNilStime, one error occur.
    I don't kown why, I had to ask the engineer of bea in china, one told me a bug.
    is that true?

    Visakh16 I cant agree more with you on it, it is good but in production u cant have them change maxrows. I think
    Patrick  Hurst is a better option. debug the package have it running and move up
    Please mark as helpful and propose as answer if you find this as correct!!! Thanks,Dia Agha .
    Hmm..Why do you need to change it in production?
    What I suggested was to tweak the setting in dev machine so that it interprets the Excel file datatypes correctly when doing development. Once mapping is set correctly then it will work fine when in production or in any other environment. The tweaking is
    just to make sure it interprets the datatype correctly at design time and has nothing to do with production deployment 
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • XML Schema -- xsi:null in document instance and nullable in XSD

    Hi,
    I have an XML document
    <DOC>
    <EMP_ID>1</EMP_ID>
    <EMP_NAME>Scott</EMP_NAME>
    <EMP_ADDRESS>USA</EMP_ADDRESS>
    </DOC>
    As to what I understand, for the document to look like
    <DOC>
    <EMP_ID>1</EMP_ID>
    <EMP_NAME>Scott</EMP_NAME>
    <EMP_ADDRESS></EMP_ADDRESS>
    </DOC>
    with no value in <EMP_ADDRESS> tag, I have to use nullable attribute in XSD and xsi:null attribute in document. Is there any other way where we don't make any modificaitons in the document

    Hi, Thanks for the reply.I have a scenario like this :
    1. We have lot of xml files in our application server ( size ranges form 2 MB to 200 MB).
    2. We have xml schema based structured storage for a column "personjoininfo" for a relational table --- Table is :
    CREATE TABLE PERSON_COMP_TABLE
    empId VARCHAR2(100) CONSTRAINT pk_PERSONCOMP PRIMARY KEY
    ,comments VARCHAR2(20)
    ,joindate DATE
    ,personjoininfo xmltype
    XMLTYPE COLUMN personjoininfo XMLSCHEMA "www.PersonInfoUrl.com" element "person"
    3. What is the best option for me to load the xml files in the personjoin info column along with the other column values.
    As I know , if I use the XML DIR ( directory feature ), I would need to put these xml files in the database server for loading ---
    So, what are my options in this scenario for loading these xml files ?
    Thanks

  • Null value of fax and Null value of email is not reflecting in SRM

    Hi
    If you change the Vendor fax and email to null value in SAP(transaction XK02 in communication for address) and replicate the vendor in SRM 5.0 with transaction BBPUPDVD, still in manage business partners BBPMAININT as vendor I am able to see old fax number and email id  instead of null value in Contact for Business Partner area.
    Where as if we change vendor fax and email to new fax and email , after replication we wre able to see new fax and email id in manage business partners transaction as vendor.
    Regards
    Dayal

    solved!

  • Exclude NULL values from SUM and AVG calculation

    Hi,
    I have column in report that contains some NULL values. When i perform SUM,MAX,MIN or AVG calculation on this column the NULL values are treated as '0' and included in calculation. Is there any way to exclude them while calculating aggregate functions? 
    As a result MIN calculation on values (NULL,0.7,0.5,0.9) gives me output as 0 when it should have been 0.5 
    Can someone please help ?
    Thanks and Regards,
    Oliver D'mello

    Hi Oliver,
    According to your description, you want to ignore the NULL values when you perform aggregation functions.
    In this scenario, aggregate functions always ignore the NULL values, because their operation objects are non-null values. So I would like to know if you have assigned “0” for NULL values. I would appreciate it if you could provide some screenshots about
    your expressions or reports.
    Besides, we have tested in our environment using  Min() function. The expression returns the minimum value among the non-null numeric values. Please refer to the screenshots below:
    Reference:
    Min Function (Report Builder and SSRS)
    Aggregate Functions Reference (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu

  • Table joins, templates, null-checks, layer confusion and localization

    Hello everyone, this is my first post on this network.
    I am designing a website that does several things, one of which is to display latest news items on the home page.
    The news items are stored in the database as a table with a basic structure: id, poster_id, postDate, subject, body
    where id is the primary key, poster_id is a foreign key to the users table, postDate is the date at which posted and the rest is obvious.
    I want to display these items with a basic template:
    subject by author at postDate
    body
    <hr />
    When a user changes his/her username, the updated username will be shown on the news listing. This is the reason why I'm using a foreign key.
    I've defined poster_id such that it can be set as NULL, meaning it was not created by a registered user, but a guest. Don't ask me why I'd want a guest to post a news item :P
    When it comes to getting the news posts from the database and resolving the poster_id to a username i just use a join. However, when poster_id is NULL i obviously don't get a username for that post but a NULL. The word "Guest" has to come in when the poster_id is null. So in my template you'd think i could just put a null check as I can't do it in sql (as far as i know anyway).
    Now, I'm using localization on the site and the word "Guest" is different depending on the locale. So you'd think i could just use a null check and a locale->get('guest_username') and that will return the word "Guest" in the right language.
    If I want to view news on different pages, and more importantly, in different forms such as just author: subject, I come across a problem. I want to avoid having to repeat that null check code on every template that views news posts. Complicating things, I want anywhere that display a username to do the null check and return the locale'd guest username if it is a null.
    Where do I put this null check? The locale object is part of the model layer, because other model objects use it.
    Is this the presentation or the model layer's responsibility? I am relatively new to this design patterns thing, but I'm getting there :) I've thought about using wrapping classes but I'm just not sure at this point and I need smart people's opinion :)
    I hope I was able to explain my problem properly and I thank anyone in advance for taking the time to read and give their insight on such a problem. Thank you :)

    antirealm wrote:
    Hello everyone, this is my first post on this network.
    I am designing a website that does several things, one of which is to display latest news items on the home page.
    The news items are stored in the database as a table with a basic structure: id, poster_id, postDate, subject, body
    where id is the primary key, poster_id is a foreign key to the users table, postDate is the date at which posted and the rest is obvious.
    I want to display these items with a basic template:
    subject by author at postDate
    body
    <hr />
    When a user changes his/her username, the updated username will be shown on the news listing. This is the reason why I'm using a foreign key.
    I've defined poster_id such that it can be set as NULL, meaning it was not created by a registered user, but a guest. Don't ask me why I'd want a guest to post a news item :PI think this is a fundamental mistake. A better design, IMO, would be to have an explicit GUEST or anonymous poster ID, but not null.
    When it comes to getting the news posts from the database and resolving the poster_id to a username i just use a join. However, when poster_id is NULL i obviously don't get a username for that post but a NULL. The word "Guest" has to come in when the poster_id is null. So in my template you'd think i could just put a null check as I can't do it in sql (as far as i know anyway).See above.
    Now, I'm using localization on the site and the word "Guest" is different depending on the locale. So you'd think i could just use a null check and a locale->get('guest_username') and that will return the word "Guest" in the right language.Localization should be a UI issue. It should be all sorted out by the time you get to the persistence layer.
    If I want to view news on different pages, and more importantly, in different forms such as just author: subject, I come across a problem. I want to avoid having to repeat that null check code on every template that views news posts. Complicating things, I want anywhere that display a username to do the null check and return the locale'd guest username if it is a null.If it's hard to do, it's worth re-thinking. Don't use null when there are sensible non-null alternatives.
    Where do I put this null check? The locale object is part of the model layer, because other model objects use it.
    Is this the presentation or the model layer's responsibility? I am relatively new to this design patterns thing, but I'm getting there :) I've thought about using wrapping classes but I'm just not sure at this point and I need smart people's opinion :)L10N and I18N issues should be the responsibility of the presentation layer, IMO.
    %

  • Recovery of VHD file from tape immediately gives null error, ID 1001, and job fails.

    I am attempting to recover a VHD from tape.   When I finish the recovery wizard and it starts to create the job, I get an immediate popup error with an ID: 1001 and a "More Information" link that goes to a "page not found" on technet.
     There is no actual errror message or other info in the dialog box.  When I click ok, the dialog and recovery wizard disappear, and no job seems to have been created. 
    I've seen a couple of other posts about this, but didn't find any solutions.  I did run a tape verification against the recovery point in question, and it completed.  (I don't see where it says passed/failed, just completed.  I assume the
    job would have failed if it found a problem?)
    I've also tried a couple of other recovery points, on different tapes, but am getting the same results. 
    Any idea what is going wrong?

    Hi,
    Can you provide DPM version and update rollup version.  Are there any events from MSDPM after the error, if so, can you supply the event details ? 
    As a workaround,  you can restore the VHD by going to Management>Tape Library>Right Click on the Tape>select backup set for the data source containing the VHD and then click on the COPY button.  That will restore to
    a network location and you can then copy it to the hyper-v server and replace the VHD manually.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT]
    This posting is provided "AS IS" with no warranties, and confers no rights.

  • The save button has a null sign through it and we cannot save the project

    For the last 45 minutes the save button does not work. The project link button will not let us share, use or view source. There is a null sign through it as well as through the save button.

    Did you Sign In first, before starting your project?
    Could you provide the screenshot of that?

  • Reading values from JTextField and using them?

    Hello,
    I am trying to make a login screen to connect to an oracle database. Im pretty new to creaing GUI. I need help with reading the values from the JTextField and to be able to use them for my connection. So do I need to apply a listener? How do I go about doing that in this project. Thanks for any code or advice.
    import java.util.*;
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    import java.sql.*;
    public class UserDialog
        String databaseURL;
        String driver;
        String database;
        String username;
        String password;
        String hostname;
        String port;
        UserDialog() {
            getInfo();
        static String[] ConnectOptionNames = { "Login", "Cancel" };
        static String   ConnectTitle = "Login screen";
        public void getInfo() {
            JPanel      connectionPanel;
            JLabel     databaseURLLabel = new JLabel("Database URL:   ", JLabel.LEFT);
         JTextField databaseURLField = new JTextField("");
         JLabel     driverLabel = new JLabel("Driver:   ", JLabel.LEFT);
         JTextField driverField = new JTextField("");
            JLabel     databaseLabel = new JLabel("Database:   ", JLabel.LEFT);
         JTextField databaseField = new JTextField("");
            JLabel     usernameLabel = new JLabel("User Name:   ", JLabel.LEFT);
         JTextField usernameField = new JTextField("");
            JLabel     passwordLabel = new JLabel("Password:   ", JLabel.LEFT);
         JTextField passwordField = new JPasswordField("");
            JLabel     hostnameLabel = new JLabel("Host Name:   ", JLabel.LEFT);
         JTextField hostnameField = new JTextField("");
            JLabel     portLabel = new JLabel("Port:   ", JLabel.LEFT);
         JTextField portField = new JTextField("");
         connectionPanel = new JPanel(false);
         connectionPanel.setLayout(new BoxLayout(connectionPanel,
                                  BoxLayout.X_AXIS));
         JPanel namePanel = new JPanel(false);
         namePanel.setLayout(new GridLayout(0, 1));
         namePanel.add(databaseURLLabel);
         namePanel.add(driverLabel);
            namePanel.add(databaseLabel);
            namePanel.add(usernameLabel);
            namePanel.add(passwordLabel);
            namePanel.add(hostnameLabel);
            namePanel.add(portLabel);
         JPanel fieldPanel = new JPanel(false);
         fieldPanel.setLayout(new GridLayout(0, 1));
         fieldPanel.add(databaseURLField);
            fieldPanel.add(driverField);
            fieldPanel.add(databaseField);
            fieldPanel.add(usernameField);
         fieldPanel.add(passwordField);
            fieldPanel.add(hostnameField);
            fieldPanel.add(portField);
         connectionPanel.add(namePanel);
         connectionPanel.add(fieldPanel);
            // Connect or quit
            databaseURL = databaseURLField.getText();
            driver = driverField.getText();
            database = databaseField.getText();
            username = usernameField.getText();
            password = passwordField.getText();
            hostname = hostnameField.getText();
            port = portField.getText();
            int n = JOptionPane.showOptionDialog(null, connectionPanel,
                                            ConnectTitle,
                                            JOptionPane.OK_CANCEL_OPTION,
                                            JOptionPane.PLAIN_MESSAGE,
                                            null, ConnectOptionNames,
                                            ConnectOptionNames[0]);
            if (n == 0) {
                System.out.println("Attempting login: " + username);
                String url = databaseURL+hostname+":"+port+":"+database;
             // load the JDBC driver for Oracle
             try{
                   DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                   Connection con =  DriverManager.getConnection (url, username, password);
                System.out.println("Congratulations! You are connected successfully.");
                con.close();
                System.out.println("Connection is closed successfully.");
             catch(SQLException e){
                System.out.println("Error: "+e);
            else if (n == 1)
                    System.exit(0);
        public static void main (String args []) {
             UserDialog ud = new UserDialog();
    }thanks again,
    James

    the reason why you can't get the text is because you are reading the value before some actually inserts anything in any fields.
    Here is what you need to do:
    Create a JDialog/JFrame. Create a JPanel and set that panel as contentPane (dialog.setContentPane(panel)). Insert all the components, ie JLabels and JTextFields. Add two buttons, Login and Cancel to the panel as well. Now get the username and password field values using getText() inside the ActionListener of the Login.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class LoginDialog extends JDialog
    String username, password;
      public LoginDialog( ){
        setTitle( "Login" );
        JPanel content = new JPanel(new GridLayout(0, 2) ); // as many rows, but only 2 columns.
        content.add( new JLabel( "User Name" ) );
        final JTextField nameField = new JTextField( "" );
        content.add( nameField );
        content.add( new JLabel( "Password" ) );
        final JTextField passField = new JTextField( "" );
        content.add( passField );
        JButton login = new JButton( "Login" );
        login.addActionListener( new ActionListener(){
          public void actionPerformed( ActionEvent ae ){
            username = nameField.getText();
            password = passField.getText();
            // call a method or write the code to verify the username and login here...
        content.add( login );
        JButton cancel = new JButton( "Cancel" );
        cancel.addActionListener( new ActionListener( ){
          public void actionPerformed( ActionEvent ae ){
            dispose(); // close the window or write any code that you want here.
        content.add( cancel );
        pack( ); // pack everything in the dialog for display.
        show(); // show the dialog.

  • IS NULL and LIKE '%'

    How can
    select * from training_participant_tab where participant_id = '9020' and
    company_id IS NULL; returns 5 records and
    select * from training_participant_tab where participant_id = '9020' and
    company_id LIKE '%'; returns NOTHING ?
    field company_id is varchar2 field..

    NULL is very much not the same as ''.
    INSERT INTO training_participant_tab (participant_id, company_id) values
    (9020,'') is not the same as INSERT INTO training_participant_tab
    (participant_id) values (9020)Not right. Oracle treats '' as NULL value:
    SQL> create table t (participant_id number, company_id varchar2(10));
    Table created.
    SQL> insert into t values (9200,'');
    1 row created.
    SQL> insert into t (participant_id) values(9200);
    1 row created.
    SQL> select * from t where company_id is null;
    PARTICIPANT_ID COMPANY_ID
              9200
              9200Rgds.

  • Code returns "null" and "0"s in main module - why?

    I am coding a program that is in two modules. The main module serves it's standard function. The inventory class/module has three functions - 1) request stock input on 4 data points (1 String and 3 integers, one of which is a double) - 2) calculate the value of the inventory, and - 3) return string which reads out the 4 data points and the calculation showing the total value of the inventory. I've created the 3 functions in the inventory class/module, but obviously don't have them referring to each other correctly because when we come to the end of the program the output is null for the String and "0"s for the int/doubles. The code is below - any ideas about how to overcome the empty output? The code compiles fine and acts like it is going to work, but when it comes to the final command line it outputs
    "null, which is item number 0, has 0 currently in stock at a price of 0.00 each. The total value of inventory in stock is 0.00"
    Main module:
    public class Main {
        @SuppressWarnings("static-access")
        public static void main(String[] args) {
            Inventory inventory = new Inventory(); //call Inventory class
            inventory.inventoryInput();
            Inventory results = new Inventory();
            results.inventoryResults(); //call for inventoryResults in Inventory class
    }Inventory module:
    import java.util.Scanner;
    import static java.lang.System.out;
    public class Inventory
      //declare and initialize variables
       int itemNumber = 0;
       String productName;
       int stockAmount = 0;
       double productCost = 0;
       double totalValue = 0;
       String inventoryResults;
       //initialize scanner
       Scanner input = new Scanner(System.in);
       public void inventoryInput ()
       out.println("Please enter item number: "); //prompt for item number
          itemNumber = input.nextInt();
       out.println( "Enter product name/description: "); //prompt for product name
          productName = input.next();
       out.println("Quantity in stock: ");
          stockAmount = input.nextInt(); // prompt for stock quantity
       out.println("What is the product cost for each unit? ");
          productCost = input.nextDouble(); // prompt for product cost
        } // end inventoryInput
        public double totalValue( double stockAmount, double productCost )
          totalValue = stockAmount * productCost;
          return totalValue; // return stock value
        } // end totalValue
        public void inventoryResults()
        out.printf("%s, which is item number %d, has %d currently in stock at a " +
         "price of %.2f each. The total value of inventory in stock is " +
         "%.2f\n.", productName, itemNumber, stockAmount, productCost, totalValue);
        } // end inventoryResult
    }// end method

    justStartingOut wrote:
    Actually my final solution was quite simple - I moved the calculation and final formated print text statements into the body of Inventory's class code. It now works. "Works" scares me a bit.
    Someone cooking dinner might rummage about in the fridge and the cupboards to see what's there. Do imaginative things with what they come up with. And, with a bit of luck come up with something tasty or, at any rate edible.
    A physician deciding on a medical treatment would do well to try a more cautious approach. A specific aim would be a good thing. And a calculated appreciation of the documented effects of each medicine. And how they interact.
    It's up to you to determine which approach your coding should resemble. But it seems to me that your original Main class had a perfectly good reason to exist. It was a driver class whose purpose seemed to be to create and use an Inventory. (And using an Inventory is a very different thing from being an Inventory, so it made perfect sense to have two different classes.) To me it works or not, depending on whether it fufills that purpose. And what you have done is not so much solve the problem of it not working, as avoid that problem.
    (If by "moved" you mean that the outputting now occurs as part of - or is called from - inventoryInput() then that is not a good thing. The input method should input: just input.)
    I think that is because once the original input was loaded into the program (when I entered product number, name, price and value), the entries were dropped when the code switched to the next step. I think your intuition is entirely correct. In particular look at what your original main() method does (my comments replacing yours):
    Inventory inventory = new Inventory(); // (A) Create an inventory...
    inventory.inventoryInput(); // ... and put stuff into it
        // (B) Create some new entirely different (and empty) inventory...
    Inventory results = new Inventory();
    results.inventoryResults(); // ... and print its contentsInstead of creating a second inventory, try printing the results of the first one.
    Edited by: pbrockway2 on Apr 22, 2008 12:37 PM
    Whoops ... just read reply 2.
    It might sense, though to call totalValue() at the end your input method (because at that point the total value has changed). Or do away with that method - which you worked on getting right in your other thread ;)

  • Distinguishing between empty string and null values

    hi all,
    I am using an ODBC connection to connect my java app to database using JDBCODBC driver. I have 2 columns 'aColumn' and 'bColumn' in my table, both allow null values. I have one row in it, which has null value in aColumn and empty string in bColumn. I retrieve this row's data and assign it to 2 columns : 'aColumnVar' and 'bColumnVar' respectively. I find out that both 'aColumnVar' and 'bColumnVar' variables has null values (although bColumnVar should has an empty string as its value). Now my ODBC connection Data Source has the option "Use ANSI nulls, paddings, and warnings" ON. I turn it off and try again. This time both 'aColumnVar' and 'bColumnVar' variables has empty string as values (although aColumnVar should has null as its value).
    How can I make sure that i can get the data exactly as it is in the database in my variables?
    Thanks

    there is a wasNull() method on ResultSet. After you
    have obtained the value of a column e.g. by calling a
    method like getString you can call wasNull and if it
    returns true then the value on the database is null.
    Check the java docs, it might explain it better
    http://java.sun.com/j2se/1.4.1/docs/api/java/sql/Result
    et.html#wasNull()I am using MS SQL Server 7.0 under Windows NT 4.0 with JDK 1.2. My ODBC connection Data Source has to have the option "Use ANSI nulls, paddings, and warnings" ON.
    I try the wasNull() method but it is doing the same thing i.e. telling me that a column is null when in database it is null (right); and a column is null when in database it is an empty string (wrong). I suspect it is something to do with the JDBC-ODBC driver I am using.

  • Hiding Entire Row having Null and default valu in SSRS Using Expression

    Hi,
    In my reports having number of rows and three columns.The first columns  value will be different for each and every row and it will be  hard corded to the text box.  My question is how to hide the particular row second and third column suppose
    to be null or empty data and each and every row had Hide is true.Please provide me the solution if anybody known.
    Regards,
    HariKan
    HariKan

    Hi Qiuyun Yn,
    Thanks for your reply.
     If i use Not Null in my query in where
    condition  then i have to add 30 fields in my where condition,  and i guess it will not give proper output why because i have 30 columns.
    So could you please give me in report level solution. I am struggling past 10 days for this issue.
    Regards,
    Hari 
    HariKan

Maybe you are looking for

  • PO creation from sales order

    Hi  we have a scenario where in we are creating a manufacturing order ( This is a sales order with no delivery relevance and billing relevance ), we use this to transfer requirement fo sales order to production( production is not in SAP) via interfac

  • SmartView (v 9.3.1.6) Options not working - #Value appears for NoData

    Hi, We suddenly have a problem with SmartView (version 9.3.1.6) retrieve files. Where we are using the HsGetValue formulas, all accounts without data are showing up as #VALUE. We changed the Options on the Display tab, for #NoData/Missing Label to -

  • Help Please- just lost 5600 songs

    I have two things going very wrong, please help. 1.I have had trouble dropping songs into iTunes. i have searched the forums and I am very frustrated at the amount of people having the same problem with no resolution. i tried to drop 20 concerts into

  • Requirement class (OVZG)

    Hi Gurus, can any give the configuration parameters for valuated and non valuated requirement class (OVZG) regards, RAM

  • Computed column and design mode

    If I have a computed field in my ViewObject (the town-name returned by a stored procedure from the town-code), and I want to create a RowSetInfo object w/ the abovementioned view as QueryInfo. In the queryInfo window if I select the source as this vi