0

1) Can a single connection to a MySql database be shared among applications?
2) Are there any possibilities that an error might accure when two applications
compete for a single connection to a MySQL database? For example, Application
1 is using the connection to submit an insert operation to the MySQL database.
So before Application 1 can complete the insert operation, Application 2 starts
to submit an insert operation to the MySQL database. Therefore a deadlock takes
place. If so what would you recommend?

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by Mitja Bonca
0

1. Do you mean one reference? If so, there is no point in this. You can simple without any harm and time consumption create a new connection reference (connection conn = new connection("string");.
No. The command will take those data that are currently available on the server. So if command1 just occured before command2, command2 will take the new data, if not, there will be only old data available for the command2.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.