Home > database > Please comment PB11 connect to the database problem. Ado.net/oledb
Please comment PB11 connect to the database problem. Ado.net/oledb
Time:09-27
I write a simple program to use ado.net to connect to the database connection, when open the five procedures, database shows that there are five links. If pb11 write a webservice, inside the connection code is ado.net, client calls this interface. If I open the client, 20 cycle constantly call interface, database connection number has been showed a connection. I would like to ask the question is, ado.net connection will automatically manage database connection pool? If can, why C/S direct application, open a few programs will have a few connection?? Why designed webservice it without every connection to generate a link??
CodePudding user response:
Keep an eye on
CodePudding user response:
Ha ha, ado.net will automatically manage the connection pool; C/S, every program that you are real and backend database connection, of course, there are several client will have a few connection; In cases where the webservice, front end do not in direct connection with the database, the real and the database connection is IIS, and your code should handle the webservice will connect before using the database, after use will disconnect, under normal circumstances, of course, there will be only one connection, even if you didn't disconnect, also ado.net decision several specific connection, but in view of the object are IIS ~ ~