insert and update data in two different database

Thread Solved

Join Date: Jan 2007
Posts: 1
Reputation: reddy5081 is an unknown quantity at this point 
Solved Threads: 0
reddy5081 reddy5081 is offline Offline
Newbie Poster

insert and update data in two different database

 
0
  #1
Jan 29th, 2007
good day ,

i am new to java ,

i am using two different databases and i want to insert data from one table to other empty table using jdbc .and it consists of null values in one table along with some data .when ever we add new data to one table it should insert into other table and existence data should be updated after insert is executed.

can i have one example with these details.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,217
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 489
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is online now Online
Code tags enforcer

Re: insert and update data in two different database

 
0
  #2
Jan 29th, 2007
Originally Posted by reddy5081 View Post
good day ,

i am new to java ,

i am using two different databases and i want to insert data from one table to other empty table using jdbc .and it consists of null values in one table along with some data .when ever we add new data to one table it should insert into other table and existence data should be updated after insert is executed.

can i have one example with these details.
Sorry, I don't see any problem with this as all datas which you save in first database are still stored in their original variables plus same string you use on first database can be send to second one, or may be modified before sending as neccesary. So what you do I presume is recive data from form, validate them, store in varables, open conection with first database, save data, close conection, open connection to second database, save data and close connection. Then go to other page or refresh original...
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: insert and update data in two different database

 
0
  #3
Jan 31st, 2007
it has nothing to do with JSP either (and anyone doing something like this in a JSP should be shot, preferably in the gut, and left for the vultures).
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,217
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 489
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is online now Online
Code tags enforcer

Re: insert and update data in two different database

 
0
  #4
Feb 1st, 2007
Originally Posted by jwenting View Post
it has nothing to do with JSP either (and anyone doing something like this in a JSP should be shot, preferably in the gut, and left for the vultures).
Hmmmm, was this addressed to me
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: insert and update data in two different database

 
0
  #5
Feb 1st, 2007
if you feel it is, it might be
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 1
Reputation: vijaymanoharrao is an unknown quantity at this point 
Solved Threads: 1
vijaymanoharrao vijaymanoharrao is offline Offline
Newbie Poster

Re: insert and update data in two different database

 
0
  #6
Feb 12th, 2007
Originally Posted by peter_budo View Post
Sorry, I don't see any problem with this as all datas which you save in first database are still stored in their original variables plus same string you use on first database can be send to second one, or may be modified before sending as neccesary. So what you do I presume is recive data from form, validate them, store in varables, open conection with first database, save data, close conection, open connection to second database, save data and close connection. Then go to other page or refresh original...

Hi all,
I have a similar sort of problem and I am little bit familiar with java-JDBC and I would like to know how do I insert data from one database table to the other database table using java. This insertion must happen when ever there is a change in first database(change in the sense like for insertion an insert and for updation an update and for deletion a delete.). please tell me the procedure to do this sort of work or a small program which gives an Idea.

help me in this issue.
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: insert and update data in two different database

 
0
  #7
Feb 14th, 2007
start your own threads, kid.
And read some tutorials... What you want is
a) well described
b) inappropriate for doing in Java (unless you're using a database engine that uses Java stored procedures maybe).
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 7
Reputation: haoyou2008 is an unknown quantity at this point 
Solved Threads: 1
haoyou2008 haoyou2008 is offline Offline
Newbie Poster

Re: insert and update data in two different database

 
-1
  #8
Sep 9th, 2008
post your code !!!
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 39
Reputation: CasTex has a little shameless behaviour in the past 
Solved Threads: 0
CasTex CasTex is offline Offline
Light Poster

Re: insert and update data in two different database

 
-2
  #9
Jun 20th, 2009
Originally Posted by jwenting View Post
it has nothing to do with JSP either (and anyone doing something like this in a JSP should be shot, preferably in the gut, and left for the vultures).
You are totally right...
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 6
Reputation: jenn11 is an unknown quantity at this point 
Solved Threads: 1
jenn11 jenn11 is offline Offline
Newbie Poster

Re: insert and update data in two different database

 
0
  #10
Aug 19th, 2009
Very useful discussion, am new to JSP, trying to learn from last two weeks, this discussion about database entry seems useful info for me. Thanks.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC