Closed Kedar782 closed 1 year ago
@dhensby Do you have any idea about this? I have stuck on this for a long time.
I recommend reading the connection pooling part of the docs: https://github.com/tediousjs/node-mssql#connection-pools
@dhensby Can I do it without using the pool? I have added my code in the above? Can I make some changes in the connection string so it will create a new connection instead of using the old one?
There is no way to create a single connection.
If you want to change the connection string you need to create a new pool and not use the global one, again it's covered in the docs.
@dhensby I went through the documentation and I did not find it. Can you please give me example here how can i achieve it? I don't want to kill previous queries and I don't want to use the existing connection when config is different. I will really appreciate it if you post a code here for this.
The part about using different pools for different connections is in the section I linked to, sub section advanced pool management - it provides example code for managing multiple pools.
Here is my code :- I'm using the mssql library in node js
I'm simultaneously executing lots of other queries in my application. My goal is to create a new connection every time using the above code and it should not kill the previous connection or query. Right now It is not killing the previous query but it is using the previous connection which is not closed. How should I disable this? Means I have to ignore the previous connection and make a new one.
I will really appreciate your help on this.