This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases 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 and Relational Databases
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: 988
    
    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: 1508
    
    5

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
 
Have you checked out Aspose?
 
subject: prepared statement
 
jQuery in Action, 3rd edition