Leave an unused MySQL connection to reuse or connect on demand, but what about classes?

I'm currently working on a desktop application using winforms and .NET 4.0, I downloaded the latest MySQL connector for .NET 4.0, but I have some doubts that it would be the best way to go with it.

NOTE. I just want to indicate that this application is for personal use and will work on my own server.

  • My application is connected to the server, but does not receive information at any time, I must connect on demand to MySQL to process the received data or leave the connection with MySQL open while the application is open at idle, so it can be reused when receiving data ?

  • I was looking for some more recent docs regarding using MySQL with C #, but all I could find were tutorials dated from 2006, there are some good examples that are more recent, which I could use as a reference ( this is my first experience using MySQL with C #). Special documents showing how to serialize / deserialize data using the DataTable material are very welcome.

    I would be pleased with some code examples that you guys often use to establish a connection or retrieve data from it.

  • Another question that I considered that is not so related to this: when should I consider using the web API through direct MySQL connections to my application?

+3
source share
1

, . , , .

, / , . , .


, :

  • "" , ( ..).
  • "Stale state", - "" (, "SET names koi8" )

mysql reset, mysql_change_user ( API ), , ( tcp).

+4

All Articles