Re: Persistant connections?
Posted by: Fernando Gonzalez Sanchez
Date: November 12, 2013 10:53AM

Hi,

That depends on the architecture of your desktop app, if you are planning to allow the user work work in several simultaneous views (forms) of the data, then you'd better off with a single connection.

You may also want to have several connection open loading in parallel data for a complex form (like web browsers that can open multiple TCP connections to a web server to get the images, markup, javascript, etc.).

Having said that, there are still other scenarios where you would prefer multiple connection, for example

If you are doing reading from a MySqlDataReader and for each row want to write back something to the database, then you'll need more than one connection (DataReader lock the connection for as long as the reader is used, and free it when it's closed (the reader)).

If you don't know in advance, for maximum flexibility it's better to have several connections, you can enable pooling to optimize the management of multiple connections.

Just my 2 cents.

Options: ReplyQuote


Subject
Written By
Posted
November 08, 2013 12:38PM
Re: Persistant connections?
November 12, 2013 10:53AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.