Dave Page wrote:
Yes, this is because the PQsetClientEncoding fails because the connection failed. I've changed the preceeding code to:
// Set client encoding to Unicode/Ascii
if (PQstatus(conn) == CONNECTION_OK)
{
#if wxUSE_UNICODE
wxLogInfo(wxT("Setting client_encoding to 'UNICODE'"));
...
...
which takes care of it.
Regards, Dave.
Doh! Of course it fails. Well, at least this saves me from having to figure out what I missed. BTW, if PQsetClientEncoding fails, which it does, then why would the error come up as a password error? Does that mean that PQsetClientEncoding doesn't change the Postgres errors like other PQ functions?
ahp