best way of executing long run query in vb.net

Last Reply one year ago By Gayatri

Posted one year ago

How to run long run query in vb.net

When i run the query timeout occurs and stop working. I have set command time out also but same problem occurs

Posted one year ago

Default connection time is 30 secs.

As you are facing a timout on your command, therefore you need to increase the timout of your sql command. You can specify it in your command like this.

// Setting command timeout to 2 minutes
cmd.CommandTimeout = 120

 


Posted one year ago

Try this

modify connection string in web config

Connection Timeout=120;Connection Lifetime=180;Min Pool Size=0;Max Pool Size=1000;Pooling=true