views:

34

answers:

2

I'm developing an application in c# .NET that is connected to a PostgresSQL database through TCP/IP with ODBC.

It is possibile to connect through named pipes ? How can i do ?

Do i need to modify connection string ?

+1  A: 

PostgreSQL does not use or support named pipes for client connections.

nos
+1  A: 
  1. PostgreSQL includes a .NET data provider- Npgsql . Any specific reason why are you using ODBC?
  2. PostgreSQL does not support named pipes- that is Windows-specific. You must use TCP.

For local PostgreSQL connections you can use the following connection string with Npgsql:

NpgsqlConnection conn = new NpgsqlConnection("Database=DatabaseName;User Id=postgres;Password=mypassword;");

Keith Blows