Defining a Connection String in Windows XP

From: ray <ray(at)aarden(dot)us>
To: pgsql-general(at)postgresql(dot)org
Subject: Defining a Connection String in Windows XP
Date: 2010-12-13 18:46:25
Message-ID: 86a2770f-55a0-43ce-83ce-5f4f8925282d@z9g2000yqz.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I would like to learn how to set a connection string.

I am running pgsql 9.0 on an XP. I found a list of connection string
examples:
» dotConnect for PostgreSQL (former Core Labs PostgreSQLDirect)
(PgSqlConnection)
» Npgsql (NpgsqlConnection)
» PostgreSQL OLE DB Provider
» .NET Framework Data Provider for OLE DB (OleDbConnection)
» PostgreSQL ODBC Driver (psqlODBC)
» .NET Framework Data Provider for ODBC (OdbcConnection)

I am trying to connect with SQL Maestro. Since pgsql provides an ODBC
driver, it seemed appropriate to work with the PostgreSQL ODBC Driver.
The suggested connection string is:
Driver={PostgreSQL};Server=IP
address;Port=5432;Database=myDataBase;Uid=myUsername;Pwd=myPassword;

I do not know if I should leave the {PostgreSQL} as is or should it be
replaced with something.
For Server, the connection is on the same machine so I would think the
value should be ‘localhost’ (without quotes).
For Database, I don’t know if this should be the name of a database
inside of my pgsql server or something else.

When I run:
Driver={PostgreSQL};Server=localhost;Port=5432;Database=myDataBase;Uid=user101;Pwd=pw101;
I get a message window that says “[Microsoft][ODBC Driver Manager]
Data source name not found and no default driver specified”.

The driver is supposed to be inside of a pgsql DLL but I don’t know
how Windows is supposed to find it. How should I set up the
connection string?

ray

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2010-12-13 19:15:51 Re: Defining a Connection String in Windows XP
Previous Message paulo matadr 2010-12-13 16:46:13 Res: Cluster with LATIN1 and UTF-8