GeeCON Prague 2014*
The moose likes JDBC and the fly likes prepared statement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Reply locked New topic
Author

prepared statement

rakhi sinha
Ranch Hand

Joined: Mar 26, 2012
Posts: 147
i am using following code .....values are coming from first servlet......if command is not working all prepared statement are running......


E Armitage
Rancher

Joined: Mar 17, 2012
Posts: 892
    
    9
rakhi sinha wrote:i am using following code .....values are coming from first servlet......if command is not working all prepared statement are running......

What is the problem again?
If your code doesn't enter any of the if blocs then print out the values of all those parameters to confirm that they are (not) null.
rakhi sinha
Ranch Hand

Joined: Mar 26, 2012
Posts: 147
E Armitage wrote:
rakhi sinha wrote:i am using following code .....values are coming from first servlet......if command is not working all prepared statement are running......

What is the problem again?
If your code doesn't enter any of the if blocs then print out the values of all those parameters to confirm that they are (not) null.


my problem is that i want to execute pst2 and pst3 only when values of m2 and m3 are not null but it is executing always,........
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1477
    
    6

try this



Swastik
rakhi sinha
Ranch Hand

Joined: Mar 26, 2012
Posts: 147
Swastik Dey wrote:try this



thanks fro your suggestion but it is giving same output .. it is not working
Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1107

As you have started another thread presuming this one also solved
 
GeeCON Prague 2014
 
subject: prepared statement