U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ SQL » Postgres library improvements
Re: Postgres library improvements [message #23042 is a reply to message #23024] Thu, 10 September 2009 10:20 Go to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
Zbych wrote on Tue, 08 September 2009 10:02


Another problem is in ErrorMessage function:
Now:
{
	if(PQclientEncoding(conn) >= 0)
		/* Client is connected, you should use FromCharset here */
		return PQerrorMessage(conn);
	/* Client is disconnected, use system code page */
	return FromCharset(PQerrorMessage(conn));
}

Proposition:
{
	if(PQclientEncoding(conn) >= 0)
		return FromCharset(PQerrorMessage(conn))
	return FromSystemCharset(PQerrorMessage(conn));
}






Yes, thanks. Actually, I believe this fix will do:

String PostgreSQLConnection::ErrorMessage()
{
	return FromCharset(PQerrorMessage(conn));
}


and not using ErrorMessage for connection failure.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Postgresql and bool
Next Topic: Acquiring large record
Goto Forum:
  


Current Time: Sun Sep 13 22:40:27 GMT+2 2026

Total time taken to generate the page: 0.01012 seconds