Not always Null is empty string.

Some databases do this distinction. Null is used to denotate absence of
value,
or to indicate that the record field has not been initializated.
Not zero, not emtpty string; just "No Value Set".

Imagine a Boolean Field. If you get a Null value, what would this mean to
you,
A False or a True value?

As you see, the emtpy string example is not applicable to boolean fields.

Some databases in their SQL Language have the boolean operator, "IS NULL".


ie.
        "SELECT NAME
        FROM EMP
        WHERE EMPNO IS NULL"

You need to check this in your database SQL command line...
xchange "IS NULL" for "= '' " ant then see what happens.


Hope this help...







-----Original Message-----
From: Bart Cassady [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 24, 1999 3:58 PM
To: [EMAIL PROTECTED]
Subject: Re: JDBC - Servlet problem


Yes, an empty string (ie. "") in Oracle is NULL.


Bart Cassady
Database Analyst
Associated Engineering Group Ltd.
[EMAIL PROTECTED]

>>> Jason Puyleart <[EMAIL PROTECTED]> 08/24 3:07 PM >>>
Hi.

This may be somewhat more JDBC orientated, but I was hoping that I could
get some help.

I am using Oracle 7 with the JDBC thin drivers.

I have a servlet that updates/displays values from a table.
The problem is that if I have an empty form value
(a string initialized to ""), when I retrieve from the database I get
a value of null.

Is this correct?  If so, how do I get an empty value into the database
without returning null?  Is NULL the same as the empty string?

Thanks in advance!!

Jason

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to