Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JDBC and Relational Databases
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
JDBC and Relational Databases
update query in servlet
satheesh subramani
Greenhorn
Posts: 29
I like...
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Class.forName("oracle.jdbc.driver.OracleDriver"); Connection connect =DriverManager.getConnection("jdbc:oracle:thin:@172.17.0.14:1521:develop","username","password"); String qry=("update sample set one=2 where two=3"); PreparedStatement ps = null; ps=connect.prepareStatement(qry); int i=ps.executeUpdate(); if(i==1) out.println("success"); else out.println("failed");
The above code is not working
The table is create table (one number,two number);
i tried some other queries like select and delete and insert is working fine then how to resolve this
amit punekar
Ranch Hand
Posts: 544
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
What do you mean by not working
1) Throwing exception or something
2) Not returning you the expected result ?
regds,
Amit
heat rs
Greenhorn
Posts: 3
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thats because your result set is empty or you can say your updating on empty result set.
Ulf Dittmer
Rancher
Posts: 43081
77
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Moved to the
JDBC
forum, as there's nothing servlet-specific about the question.
satheesh subramani
Greenhorn
Posts: 29
I like...
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
sorry for everyone,
thanks for your help i forgot to commit the database
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
problem in jsp code(validation of customer details)
updating rows in table error
JDBC Connection
ResultSet can not print the first row
Displaying sql qry in a JTable
More...