954,574 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

insert and update data in two different database

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.

reddy5081
Newbie Poster
1 post since Jan 2007
Reputation Points: 10
Solved Threads: 0
 
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...

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 

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

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 
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 :?:

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 

if you feel it is, it might be ;)

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 
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.

vijaymanoharrao
Newbie Poster
1 post since Feb 2007
Reputation Points: 10
Solved Threads: 1
 

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

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

post your code !!!

haoyou2008
Newbie Poster
7 posts since Sep 2008
Reputation Points: 6
Solved Threads: 1
 
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...

CasTex
Light Poster
45 posts since Mar 2008
Reputation Points: 3
Solved Threads: 0
 

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.

jenn11
Light Poster
25 posts since Jul 2009
Reputation Points: 7
Solved Threads: 2
 

hi how to update the table using stored procedure in jsp program

9944574568
Newbie Poster
3 posts since Nov 2009
Reputation Points: 10
Solved Threads: 0
 

can u please help me..please send me the code for that how to update the table using stored procedure in jsp program ..need it urgent

9944574568
Newbie Poster
3 posts since Nov 2009
Reputation Points: 10
Solved Threads: 0
 
can u please help me..please send me the code for that how to update the table using stored procedure in jsp program ..need it urgent

Start a new thread

javaAddict
Nearly a Senior Poster
Team Colleague
3,329 posts since Dec 2007
Reputation Points: 1,014
Solved Threads: 448
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You