|
|
Home » Community » Newbie corner » PostgreSQL Connection Errors
|
|
|
|
|
Re: PostgreSQL Connection Errors [message #38267 is a reply to message #38256] |
Sat, 08 December 2012 17:58   |
nejnadusho
Messages: 60 Registered: October 2012
|
Member |
|
|
Lance,
I am not sure i understand what you mean with
Quote: |
Can you post a screen shot of your main package package organizer?
|
Also I have another question.
Lets say I set it up correctly and start working locally.
When it comes time to compile the project and more specifically the server side app.
Before I compile the app do I have to again make all those references and setups with the appropriate paths to the server's database?
Thank you very much.
Best,
Georgi
[Updated on: Sat, 08 December 2012 17:58] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: PostgreSQL Connection Errors [message #38285 is a reply to message #38283] |
Sun, 09 December 2012 02:08  |
Lance
Messages: 656 Registered: March 2007
|
Contributor |
|
|
You are welcome.
This code is from the reference example SQLPostgreSQL (or something like this)
bool PostgreSQLTest::OpenDB()
{
if(!m_session.Open("host=localhost dbname=test user=test password=test"))
{
Exclamation(Format("Error in open: %s", DeQtf(m_session.GetLastError())));
return false;
}
m_array.SetSession(m_session);
You should be able to supply the correct host, and one of your actual db, user and password. For the port part, you should be able to add something like port=5433 to that string.
!m_session.Open("host=localhost port=5433 dbname=mydb user=myusername password=mypassword"))
....
Let me know if it didn't work for you.
|
|
|
Goto Forum:
Current Time: Tue Apr 29 01:50:10 CEST 2025
Total time taken to generate the page: 0.01492 seconds
|
|
|