+ 2

insert data in two different databases using ajax

Does anyone knows how to insert data in two different databases at the same time using ajax? In add form there is multiple data that needs to be filled but they are splited in two different databases, so when I press add button it should save data in both databases.

28th Oct 2021, 10:08 AM
Eric Kazhus
Eric Kazhus - avatar
7 ответов
+ 1
Two different databases or two different tables in database?
28th Oct 2021, 10:59 AM
A͢J
A͢J - avatar
+ 1
two different databases
28th Oct 2021, 11:00 AM
Eric Kazhus
Eric Kazhus - avatar
+ 1
Eric Kazhus You can make two different connection for each database.
28th Oct 2021, 11:37 AM
A͢J
A͢J - avatar
+ 1
Already have done that! I have 2 insert into functions too that should save data in one database and other data in second database, but I think problem is in ajax/javascript code part that I have. thought if there is some kind of example which to follow because couldnt find anything useful in internet.
28th Oct 2021, 12:05 PM
Eric Kazhus
Eric Kazhus - avatar
0
We can do this without ajax also In jdbc i will create 2 methods Method 1 is working with oracle Method 2 is working with mysql Passing data will be depend upon tablename and fields available in database
28th Oct 2021, 5:22 PM
sree harsha
sree harsha - avatar
0
Method 2 is working with mysql Can You provide an example please?
28th Oct 2021, 6:11 PM
Eric Kazhus
Eric Kazhus - avatar