• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stored procedure not being refreshed while accessing through code

 
Saumya Nair
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,


I m using Tomacat to run a web-application. Used stored procedure to access data from MSSQL Server. But when i re-run the application, it always calls the old stored procedure,while the result displayed in the Query Analyser is the modified one. Tried restarting the server as well as deleting the work folder and the generated class files too. But no change.

Even if i add/remove a parameter in the already created stored procedure it refuses to accept it. Gives an SQLException sayin the parameter is coded.Checked the code.. No errors with the code..

Plz help
 
Tom George
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello there,
Not sure if this thread is relevant in a JSP forum; Maybe you can try deleting and recreating the procedure, create it under a new name etc and then try to call it. Maybe check how you're connecting to the database to make sure you're going to the right table. This should not be related in any way to the fact that you're running JSP in Tomcat.

Cheers!
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the JDBC forum where the database gurus hang out.
 
Saumya Nair
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
tried deleting n recreating it too.. works fine with Query analyzer... but with code it says "could not find the stored procedure"
 
Scott Selikoff
author
Saloon Keeper
Posts: 4010
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It might be that the stored procedure is attached to a specific user or defined on both a user and system level. That's the most common case I've seen for the problem you're describing.

Query Analyzer does some nice things for you and figures out users whereas direct JDBC often only has access to specific items based on the user you logged in as. Try calling the procedure with the user's name.
 
Saumya Nair
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes.. it did work.. Thank you
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic