Re: Another question on JSP & Java Bean adding data to database

2002-04-05 Thread vijay

then befor inserting into the database, check for each value. if it is null
dont send it, . initially set the optional fields values to blank
thanks & regards
vijayanand.R

(),,,()
   ( (.  .) .-''''''''''-.
  (o  ) ) ('o'   )
=(,,)=(,,)=(,,)==(,,)=
- Original Message -
From: "[Aruniima Chakrabarti]" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 05, 2002 8:56 PM
Subject: Re: Another question on JSP & Java Bean adding data to database


Thank you vijay. But the thing is that I want null value or something that
indicates that the user has given no answer for that field as it is an
optional field.

Regards,
aruniima

 -Original Message-
From:   vijay [mailto:[EMAIL PROTECTED]]
Sent:   Friday, April 05, 2002 11:45 AM
To:     [EMAIL PROTECTED]
Subject:Re: Another question on JSP & Java Bean adding data to
database

while inserting into the database, u can use NVL function to avoid null
values..
thanks & regards
vijayanand.R

(),,,()
   ( (.  .) .-''''''''''-.
  (o  ) ) ('o'   )
=(,,)=(,,)=(,,)==(,,)=
- Original Message -
From: "[Aruniima Chakrabarti]" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 05, 2002 8:40 PM
Subject: Another question on JSP & Java Bean adding data to database


Posting this question again as not sure that it has been sent properly.
Hello everybody,
I have another question.
The fields in the database are optional. Now when the bean to inserts the
data in the table, it puts in a string which reads as "null"  but  for the
database it is an value equal to the string "null" & not the database NULL
for the field. Hence, when I write my queries, I search for a string equal
to 'null' instead of the field which "Is Null"
Now, my question is that
*   is there a way out of this?
*   what is better programming practice, you allow the null string which
the java bean puts on its own or you put the database NULL value for null
fields by modifying the insert query?

Kindly help .
Thank you in advance.
Regards,
aruniima

-Original Message-
From:   [Aruniima Chakrabarti]
[mailto:[EMAIL PROTECTED]]
<mailto:[mailto:[EMAIL PROTECTED]]>
Sent:   Friday, April 05, 2002 1:12 PM
To: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Subject:Help on parameter begin passed from JSP to Java Bean

Hello everyone,
I have a HTML page which calls a JSP page on submit, which has a 'useBean' &
'setProperty' tags set so that the values from the HTML is passed to the
Bean to be updated in the database. Some of the fields on HTML page & the
corresponding field in the database are optional.
Now the problem I am facing is that if the first time the user puts a value
in the text box & submits page, it gets updated without a problem.  But the
next time if he leaves the text box empty & submits, then the previous
entered value for the textbox is taken instead of null value.  Refreshing of
the page is not solving the problem & closing - opening of the page again is
not feasible. How should I handle this problem?  I tried changing the
'scope' but that is not solving the problem.
Kindly help. Thanks in advance.
Regards,
aruniima



Regards,
aruniima



This message contains privileged and confidential information and is
intended only for the individual named. If you are not the intended
recepient you should not disseminate, distribute, store, print, copy or
deliver this message. Please notify the sender immediately by e-mail if you
have received this e-mail by mistake and immediately delete this e-mail from
your system.


E-mail transmission cannot be guaranteed to be secure or error-free as
information could be intercepted, corrupted, lost, destroyed, arrive late or
incomplete, or contain viruses. The sender therefore does not accept
liability for any errors or omissions in the contents of this message which
arise as a result of e-mail transmission.  If verification is required
please request a hard-copy version.


--

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

==

Re: Another question on JSP & Java Bean adding data to database

2002-04-05 Thread Gunaseelan Nagarajan

hi,
The string "null" is not the same as null. Technically, the user could also
enter the string "null" in a texfield. Then it becomes messy to check for all
the exceptions etc. Best option is to store NULL in the database.

regards,
Nagarajan.


On Friday 05 April 2002 12:40, you wrote:
> Posting this question again as not sure that it has been sent properly.
> Hello everybody,
> I have another question.
> The fields in the database are optional. Now when the bean to inserts the
> data in the table, it puts in a string which reads as "null"  but  for the
> database it is an value equal to the string "null" & not the database NULL
> for the field. Hence, when I write my queries, I search for a string equal
> to 'null' instead of the field which "Is Null"
> Now, my question is that
> *   is there a way out of this?
> *   what is better programming practice, you allow the null string
> which the java bean puts on its own or you put the database NULL value for
> null fields by modifying the insert query?
>
> Kindly help .
> Thank you in advance.
> Regards,
> aruniima
>

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Another question on JSP & Java Bean adding data to database

2002-04-05 Thread [Aruniima Chakrabarti]

Thank you vijay. But the thing is that I want null value or something that
indicates that the user has given no answer for that field as it is an
optional field.

Regards,
aruniima

 -Original Message-
From:   vijay [mailto:[EMAIL PROTECTED]]
Sent:   Friday, April 05, 2002 11:45 AM
To: [EMAIL PROTECTED]
Subject:Re: Another question on JSP & Java Bean adding data to
database

while inserting into the database, u can use NVL function to avoid null
values..
thanks & regards
vijayanand.R

(),,,()
   ( (.  .) .-''''''''''-.
  (o  ) ) ('o'   )
=(,,)=(,,)=(,,)==(,,)=
- Original Message -
From: "[Aruniima Chakrabarti]" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 05, 2002 8:40 PM
Subject: Another question on JSP & Java Bean adding data to database


Posting this question again as not sure that it has been sent properly.
Hello everybody,
I have another question.
The fields in the database are optional. Now when the bean to inserts the
data in the table, it puts in a string which reads as "null"  but  for the
database it is an value equal to the string "null" & not the database NULL
for the field. Hence, when I write my queries, I search for a string equal
to 'null' instead of the field which "Is Null"
Now, my question is that
*   is there a way out of this?
*   what is better programming practice, you allow the null string which
the java bean puts on its own or you put the database NULL value for null
fields by modifying the insert query?

Kindly help .
Thank you in advance.
Regards,
aruniima

-Original Message-
From:   [Aruniima Chakrabarti]
[mailto:[EMAIL PROTECTED]]
<mailto:[mailto:[EMAIL PROTECTED]]>
Sent:   Friday, April 05, 2002 1:12 PM
To: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Subject:Help on parameter begin passed from JSP to Java Bean

Hello everyone,
I have a HTML page which calls a JSP page on submit, which has a 'useBean' &
'setProperty' tags set so that the values from the HTML is passed to the
Bean to be updated in the database. Some of the fields on HTML page & the
corresponding field in the database are optional.
Now the problem I am facing is that if the first time the user puts a value
in the text box & submits page, it gets updated without a problem.  But the
next time if he leaves the text box empty & submits, then the previous
entered value for the textbox is taken instead of null value.  Refreshing of
the page is not solving the problem & closing - opening of the page again is
not feasible. How should I handle this problem?  I tried changing the
'scope' but that is not solving the problem.
Kindly help. Thanks in advance.
Regards,
aruniima



Regards,
aruniima



This message contains privileged and confidential information and is
intended only for the individual named. If you are not the intended
recepient you should not disseminate, distribute, store, print, copy or
deliver this message. Please notify the sender immediately by e-mail if you
have received this e-mail by mistake and immediately delete this e-mail from
your system.


E-mail transmission cannot be guaranteed to be secure or error-free as
information could be intercepted, corrupted, lost, destroyed, arrive late or
incomplete, or contain viruses. The sender therefore does not accept
liability for any errors or omissions in the contents of this message which
arise as a result of e-mail transmission.  If verification is required
please request a hard-copy version.


--

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com


This message contains privileged and 

Re: Another question on JSP & Java Bean adding data to database

2002-04-05 Thread vijay

while inserting into the database, u can use NVL function to avoid null
values..
thanks & regards
vijayanand.R

(),,,()
   ( (.  .) .-''''''''''-.
  (o  ) ) ('o'   )
=(,,)=(,,)=(,,)==(,,)=
- Original Message -
From: "[Aruniima Chakrabarti]" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 05, 2002 8:40 PM
Subject: Another question on JSP & Java Bean adding data to database


Posting this question again as not sure that it has been sent properly.
Hello everybody,
I have another question.
The fields in the database are optional. Now when the bean to inserts the
data in the table, it puts in a string which reads as "null"  but  for the
database it is an value equal to the string "null" & not the database NULL
for the field. Hence, when I write my queries, I search for a string equal
to 'null' instead of the field which "Is Null"
Now, my question is that
*   is there a way out of this?
*   what is better programming practice, you allow the null string which
the java bean puts on its own or you put the database NULL value for null
fields by modifying the insert query?

Kindly help .
Thank you in advance.
Regards,
aruniima

-Original Message-
From:   [Aruniima Chakrabarti]
[mailto:[EMAIL PROTECTED]]
<mailto:[mailto:[EMAIL PROTECTED]]>
Sent:   Friday, April 05, 2002 1:12 PM
To: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Subject:Help on parameter begin passed from JSP to Java Bean

Hello everyone,
I have a HTML page which calls a JSP page on submit, which has a 'useBean' &
'setProperty' tags set so that the values from the HTML is passed to the
Bean to be updated in the database. Some of the fields on HTML page & the
corresponding field in the database are optional.
Now the problem I am facing is that if the first time the user puts a value
in the text box & submits page, it gets updated without a problem.  But the
next time if he leaves the text box empty & submits, then the previous
entered value for the textbox is taken instead of null value.  Refreshing of
the page is not solving the problem & closing - opening of the page again is
not feasible. How should I handle this problem?  I tried changing the
'scope' but that is not solving the problem.
Kindly help. Thanks in advance.
Regards,
aruniima



Regards,
aruniima



This message contains privileged and confidential information and is
intended only for the individual named. If you are not the intended
recepient you should not disseminate, distribute, store, print, copy or
deliver this message. Please notify the sender immediately by e-mail if you
have received this e-mail by mistake and immediately delete this e-mail from
your system.


E-mail transmission cannot be guaranteed to be secure or error-free as
information could be intercepted, corrupted, lost, destroyed, arrive late or
incomplete, or contain viruses. The sender therefore does not accept
liability for any errors or omissions in the contents of this message which
arise as a result of e-mail transmission.  If verification is required
please request a hard-copy version.


--

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Another question on JSP & Java Bean adding data to database

2002-04-05 Thread [Aruniima Chakrabarti]

Posting this question again as not sure that it has been sent properly.
Hello everybody,
I have another question.
The fields in the database are optional. Now when the bean to inserts the
data in the table, it puts in a string which reads as "null"  but  for the
database it is an value equal to the string "null" & not the database NULL
for the field. Hence, when I write my queries, I search for a string equal
to 'null' instead of the field which "Is Null"
Now, my question is that
*   is there a way out of this?
*   what is better programming practice, you allow the null string which
the java bean puts on its own or you put the database NULL value for null
fields by modifying the insert query?

Kindly help .
Thank you in advance.
Regards,
aruniima

-Original Message-
From:   [Aruniima Chakrabarti]
[mailto:[EMAIL PROTECTED]]

Sent:   Friday, April 05, 2002 1:12 PM
To: [EMAIL PROTECTED] 
Subject:Help on parameter begin passed from JSP to Java Bean

Hello everyone,
I have a HTML page which calls a JSP page on submit, which has a 'useBean' &
'setProperty' tags set so that the values from the HTML is passed to the
Bean to be updated in the database. Some of the fields on HTML page & the
corresponding field in the database are optional.
Now the problem I am facing is that if the first time the user puts a value
in the text box & submits page, it gets updated without a problem.  But the
next time if he leaves the text box empty & submits, then the previous
entered value for the textbox is taken instead of null value.  Refreshing of
the page is not solving the problem & closing - opening of the page again is
not feasible. How should I handle this problem?  I tried changing the
'scope' but that is not solving the problem.
Kindly help. Thanks in advance.
Regards,
aruniima



Regards,
aruniima



This message contains privileged and confidential information and is
intended only for the individual named. If you are not the intended
recepient you should not disseminate, distribute, store, print, copy or
deliver this message. Please notify the sender immediately by e-mail if you
have received this e-mail by mistake and immediately delete this e-mail from
your system.


E-mail transmission cannot be guaranteed to be secure or error-free as
information could be intercepted, corrupted, lost, destroyed, arrive late or
incomplete, or contain viruses. The sender therefore does not accept
liability for any errors or omissions in the contents of this message which
arise as a result of e-mail transmission.  If verification is required
please request a hard-copy version.


--

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com