Re: Defining a Connection String in Windows XP

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: ray <ray(at)aarden(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Defining a Connection String in Windows XP
Date: 2010-12-13 19:15:51
Message-ID: 4D0670E7.7040905@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 13/12/2010 18:46, ray wrote:

> 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).

Yes, that's right.

> For Database, I don’t know if this should be the name of a database
> inside of my pgsql server or something else.

Yes, it's the specific database to which you want to connect.

> 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”.

What you're doing above is creating a DSN-less connection. I haven't
done it that way, but have had no problems when creating a DSN first. Go
to Administrative Tools -> Data sources (ODBC) and create a data source
for the database. You can then use a connection string something like this:

dsn=yourDsnName;uid=myUsername;pwd=myPassword;

HTH,

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message ray 2010-12-13 19:30:29 Re: Defining a Connection String in Windows XP
Previous Message ray 2010-12-13 18:46:25 Defining a Connection String in Windows XP