Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2006

Tip: Looking for answers? Try searching our database.

is there any difference b/w connection of a simple java prog. and a servlet.

Thread view: 
Garg - 16 Dec 2006 19:18 GMT
Hi All,

Can anny one help me.

I am trying to update the database by using a callable statement. But
in case of servlet i am getting  an error
java.sql.SQLException: Not all parameters bound.

But if i call the same procedure with same data and every thing. it is
able to update the database.

I am not able to understand the difference between a simple java
program call and a servlet call.

Thanks
Tarun Garg
Daniel Pitts - 16 Dec 2006 20:24 GMT
> Hi All,
>
[quoted text clipped - 12 lines]
> Thanks
> Tarun Garg
I'm guessing that you're not Actually calling stored proc the same way
in both cases.  Use a debugger, or logger, to verify that the exact
same SQL and parameters are passed through.
Garg - 17 Dec 2006 07:13 GMT
No.

I am coping and pasting the same code from the jave prog. to  the
servlet. so there is no mismatch.

butmine understanding is java prog is run by a JVM and that handles all
the thing. but in case of servlet application server (tomcat i m using)
is handling all these things. So is there any difference between
'execute' of JVM and application server.

Or as i am using Cache as a database, that it self is not able to
handle this.

Tarun Garg
Arne Vajhøj - 24 Dec 2006 01:08 GMT
> I am coping and pasting the same code from the jave prog. to  the
> servlet. so there is no mismatch.
[quoted text clipped - 3 lines]
> is handling all these things. So is there any difference between
> 'execute' of JVM and application server.

A standalone app and a servlet can differ in how the
connection is created. There should be no
difference in the execution of SQL statements.

Try and check:
- that JDBC driver version is the same
- that the parameters you set are actually the same

Arne


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.