Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 2nd, 2011, 03:33 AM
kochark kochark is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2011
Posts: 13 kochark User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 33 m 44 sec
Reputation Power: 0
Update query

hi,

i have a table that contain a column "uemail".
i m stuck with an update statment where user can update his/her email with an alternate email.

My query:

("update table set uemail = '"+ getEdt()+"' where email='"+rBean.getUemail()+"'")

here getEdt is the new object that will set new email and getUemail is the old email through which a user is logged in.

by using the above query i am getting a successful update page but when i check the database, it contain the old email value only. and not updating it to a new value.

i am sure thr is something wrong with my update query.

please anyone help me out with this.

thanks
kunal

Reply With Quote
  #2  
Old June 3rd, 2011, 07:19 AM
kendare kendare is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2011
Posts: 1 kendare User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 m 56 sec
Reputation Power: 0
Quote:
Originally Posted by kochark
hi,

i have a table that contain a column "uemail".
i m stuck with an update statment where user can update his/her email with an alternate email.

My query:

("update table set uemail = '"+ getEdt()+"' where email='"+rBean.getUemail()+"'")

here getEdt is the new object that will set new email and getUemail is the old email through which a user is logged in.

by using the above query i am getting a successful update page but when i check the database, it contain the old email value only. and not updating it to a new value.

i am sure thr is something wrong with my update query.

please anyone help me out with this.

thanks
kunal


Hey,

You should exe commit after updating the data.

Reply With Quote
  #3  
Old June 3rd, 2011, 03:02 PM
kochark kochark is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2011
Posts: 13 kochark User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 33 m 44 sec
Reputation Power: 0
hi,
thanks for replying.

i am still not able to rectify.

i have tried using a command in sql command prompt it goes.

"" update users set email=abcd@gmail.com where email=qazws@gmail.com;

i am getting an error
Oracle-04054: database link to gmail.com does not exist.

i am new to this so i don't understand this error.

any suggestions.?

thanks
kunal

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Update query

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap