File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes problem with update using preparedstatement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "problem with update using preparedstatement" Watch "problem with update using preparedstatement" New topic
Author

problem with update using preparedstatement

Manasa Tripathy
Greenhorn

Joined: Nov 07, 2004
Posts: 1
Hi
I am using preparedstatement to fire insert / update statements.
the update query is taking a lot of time(min 150 ms) where as the insert query takes 0-10 ms .

i'm using mssql driver with sql2000.

if i use Statement instead of preparedstatement it just takes 0-10 ms.

even after firing 1000 querries the time taken by preparedstatement to execute an individual query remains same -then wht's the advantage i am getting from prepared statement???

what might be the problem???

Regards
Manasa
[ November 07, 2004: Message edited by: Manasa Tripathy ]
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31075
    
232

Manasa,
Can you show the prepared statement's SQL?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with update using preparedstatement