Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.Net PostgreSQL Connection String

I am using PostgreSQL in a project I am working on, and one of the queries is timing out. I need to increase the timeout on the database connection, but since I am using my DAO through a complex wrapper to Active Record and NHibernate, I am not able to adjust the timeout of the command object - so I am hoping you can change the timeout through the connection string.

Any ideas?

like image 972
Ash Avatar asked Jan 21 '09 05:01

Ash


1 Answers

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

like image 97
EdgarVerona Avatar answered Sep 30 '22 15:09

EdgarVerona