The application, running on the client, connects to SQL server for many simultaneous queries involving select, insert and update. Application creats a thread for each query. Each thread connects to the sql server via ODBC using sqlconnect.
However I find that the individual thread do not close properly and stay open even after sqldisconnect has been issued on the client. At one point I have over 1200 threads on client application trying simultaneously to connect to the server and the sqlserver is holding with 276 threads open.
I do not understand why the ODBC connection stays open even after sqldisconnect is issued. I have even tried disabling connection pooling, to no effect. The performance is very poor.
How can I issue a large number of queries to same sql server via ODBC while guaranteeing performance?