User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 427,680 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,298 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 7144 | Replies: 7 | Solved
Reply
Join Date: Jan 2007
Posts: 1
Reputation: reddy5081 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
reddy5081 reddy5081 is offline Offline
Newbie Poster

Solution insert and update data in two different database

  #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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,467
Reputation: peter_budo is a jewel in the rough peter_budo is a jewel in the rough peter_budo is a jewel in the rough peter_budo is a jewel in the rough 
Rep Power: 11
Solved Threads: 296
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: insert and update data in two different database

  #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)

If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Reply With Quote  
Join Date: Nov 2004
Location: Netherlands
Posts: 5,752
Reputation: jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough 
Rep Power: 18
Solved Threads: 199
Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: insert and update data in two different database

  #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  
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,467
Reputation: peter_budo is a jewel in the rough peter_budo is a jewel in the rough peter_budo is a jewel in the rough peter_budo is a jewel in the rough 
Rep Power: 11
Solved Threads: 296
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: insert and update data in two different database

  #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)

If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Reply With Quote  
Join Date: Nov 2004
Location: Netherlands
Posts: 5,752
Reputation: jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough 
Rep Power: 18
Solved Threads: 199
Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: insert and update data in two different database

  #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  
Join Date: Feb 2007
Posts: 1
Reputation: vijaymanoharrao is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
vijaymanoharrao vijaymanoharrao is offline Offline
Newbie Poster

Re: insert and update data in two different database

  #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  
Join Date: Nov 2004
Location: Netherlands
Posts: 5,752
Reputation: jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough 
Rep Power: 18
Solved Threads: 199
Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: insert and update data in two different database

  #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  
Join Date: Sep 2008
Posts: 7
Reputation: haoyou2008 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
haoyou2008 haoyou2008 is offline Offline
Newbie Poster

Re: insert and update data in two different database

  #8  
34 Days Ago
post your code !!!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JSP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JSP Forum

All times are GMT -4. The time now is 11:16 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC