Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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: 14267
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 Aug 24 22:25:45 CEST 2025

Total time taken to generate the page: 0.05054 seconds