To close or not to close connection in database

后端 未结 7 1067
名媛妹妹
名媛妹妹 2021-01-17 21:15

I work with Windows-Mobile and Windows-CE using SqlCE and I dont know what better to do.

To open connection when the program open, run any

7条回答
  •  时光取名叫无心
    2021-01-17 21:32

    Connection establishment is a slow operation, so, creating and closing it can slow down the application. On the opposite hand, if you have a lot of clients, the connection pool will be filled very quickly and other clients won't be able to connect.

提交回复
热议问题