.Net PostgreSQL Connection String .Net PostgreSQL Connection String postgresql postgresql

.Net PostgreSQL Connection String


Npgsql-native connection string:

Server=127.0.0.1;Port=5432;Userid=u;Password=p;Protocol=3;SSL=false;Pooling=false;MinPoolSize=1;MaxPoolSize=20;Timeout=15;SslMode=Disable;Database=test"


Try this one:

Provider=PostgreSQL OLE DB Provider;Data Source=myServerAddress;location=myDataBase;User ID=myUsername;password=myPassword;timeout=1000;

Just replace the obvious parts (myUsername, myServerAddress, etc...) with your stuff.

Also, for your reference, this site will give you connection string templates for pretty much any database on earth for pretty much any way you need to use it:

http://www.connectionstrings.com


Have you tried to optimize the query? Optimizing is the best choice over increasing timeouts.