If the field you are inserted into a character field that does not contain the
NOT NULL atttribute, the empty string will be treated as null. If you
susequently retrieve the same field, you could use the following to guard
against select a NULL field:
NVL(name_of_field, ' ') <-- blank enclosed with singe quotes.
then, check the value of the field and display accordingly.
Brendan Johnston <[EMAIL PROTECTED]> on 08/24/99 06:29:29 PM
Please respond to "A mailing list for discussion about Sun Microsystem's Java
Servlet API Technology." <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
cc:
Subject: Re: JDBC - Servlet problem
This is the way Oracle seems to work.
I don't think any other database has this problem.
I don't know any good workarounds.
Brendan
Jason Puyleart <[EMAIL PROTECTED]> on 08/24/99 02:07:56 PM
To: [EMAIL PROTECTED]
cc: (bcc: Brendan Johnston/Contractor/CF/CCI)
Subject: JDBC - Servlet problem
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